diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2023-12-11 16:36:07 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2023-12-15 09:44:58 +0100 |
| commit | 95c5e9fda4aa77f7c41c60cefda0fb21f21b671a (patch) | |
| tree | 356e5f0df61a4f30d2db997be2435be0f6b9a048 /.github | |
| parent | 201fb9a913b583ca2c955298211b4ecde86486b6 (diff) | |
| download | mullvadvpn-95c5e9fda4aa77f7c41c60cefda0fb21f21b671a.tar.xz mullvadvpn-95c5e9fda4aa77f7c41c60cefda0fb21f21b671a.zip | |
Add `testframework-clippy.yml`
Check for code quality improvements on all rust source code with
`clippy` in the `test` workspace.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/testframework-clippy.yml | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/.github/workflows/testframework-clippy.yml b/.github/workflows/testframework-clippy.yml new file mode 100644 index 0000000000..670001c882 --- /dev/null +++ b/.github/workflows/testframework-clippy.yml @@ -0,0 +1,73 @@ +# Run `clippy` on the `test` workspace +--- +name: DES Testframework - Clippy +on: + pull_request: + paths: + - 'test/**/*.rs' + - .github/workflows/clippy-test.yml + - clippy.toml + workflow_dispatch: +jobs: + clippy-check-test: + name: Clippy linting of test workspace + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: stable + components: clippy + override: true + + - name: Install build dependencies + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install libdbus-1-dev + + - name: Clippy check + working-directory: test + shell: bash + env: + RUSTFLAGS: --deny warnings + run: | + time cargo clippy --locked -- -W clippy::unused_async + + clippy-check-test-windows: + name: Clippy linting of test workspace (Windows) + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions-rs/toolchain@v1.0.6 + with: + toolchain: stable + components: clippy + override: true + + - name: Clippy check + working-directory: test + shell: bash + env: + RUSTFLAGS: --deny warnings + run: | + # Exclude checking test-manager on Windows, since it is not a supported compilation target. + time cargo clippy --workspace --exclude test-manager --locked -- -W clippy::unused_async |
