From 9862a387198cd4d0883d21113fc84c22a621189d Mon Sep 17 00:00:00 2001 From: yoannblot Date: Sat, 21 Mar 2026 10:08:42 +0100 Subject: [PATCH] chore: Quality checks in GitHub actions --- .github/workflows/quality.yml | 37 +++++++++++++++++++++++++++++++++++ tests/integration_test.rs | 4 +--- 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/quality.yml diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..6f15f86 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,37 @@ +name: quality.yml +on: + pull_request: + +concurrency: + group: ${{ github.event.pull_request.number || github.run_id }}-quality + cancel-in-progress: true + +jobs: + quality-tools: + name: Run quality tools + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Setup Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Cache Rust + uses: Swatinem/rust-cache@v2 + + - name: cargo check + run: cargo check --locked + + - name: cargo fmt --check + run: cargo fmt --check + + - name: cargo clippy + run: cargo clippy -- -D warnings + + - name: cargo test + run: cargo test --locked diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 8915edc..befa082 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -7,7 +7,5 @@ fn test_main_output() { .expect("Failed to run binary"); let stdout = String::from_utf8_lossy(&output.stdout); - assert!( - stdout.contains("PHP Refactor") - ); + assert!(stdout.contains("PHP Refactor")); }