aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/push-test.yml
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-04-26 21:56:40 +0200
committerGitHub <noreply@github.com>2023-04-26 21:56:40 +0200
commite38ab60e1e4f565f0dafdb7b539e386a390594d7 (patch)
tree508d12c48966b4eaa58db7d5b8f3fe07cff82589 /.github/workflows/push-test.yml
parentce9f6489f21a647eeeb85ae1548f94dc038ac21c (diff)
downloadFlightCore-e38ab60e1e4f565f0dafdb7b539e386a390594d7.tar.gz
FlightCore-e38ab60e1e4f565f0dafdb7b539e386a390594d7.zip
Run `cargo clippy` in CI on each push (#292)
Clippy checks for common errors and fails the CI if one is spotted
Diffstat (limited to '.github/workflows/push-test.yml')
-rw-r--r--.github/workflows/push-test.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/.github/workflows/push-test.yml b/.github/workflows/push-test.yml
index d89c868d..4cac9da3 100644
--- a/.github/workflows/push-test.yml
+++ b/.github/workflows/push-test.yml
@@ -27,6 +27,34 @@ jobs:
- name: Format check
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
+ clippy:
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: [ubuntu-22.04, windows-latest]
+
+ name: clippy-check
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v3
+ - uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: stable
+ components: clippy
+ - name: install dependencies (ubuntu only)
+ if: matrix.platform == 'ubuntu-22.04'
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
+ - name: Create dist folder (Ubuntu only)
+ if: matrix.platform == 'ubuntu-22.04'
+ run: mkdir --parent src-vue/dist
+ - name: Create dist folder (Windows only)
+ if: matrix.platform == 'windows-latest'
+ run: New-Item -ItemType Directory -Force -Path "src-vue\dist"
+ - name: Run clippy
+ run: cargo clippy --manifest-path src-tauri/Cargo.toml -- --no-deps --deny warnings
+
# Ensure committed bindings correct
autogen-ts-bindings-check:
runs-on: ubuntu-latest