chore: fix rust lint #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust lint | |
on: | |
push: | |
branches: [main, dev] | |
pull_request: | |
branches: ["**"] | |
# Make sure CI fails on all warnings, including Clippy lints | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
rust_lint: | |
defaults: | |
run: | |
working-directory: ./src-tauri | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install minimal stable | |
uses: dtolnay/rust-toolchain@stable | |
- uses: actions/checkout@v4 | |
- uses: swatinem/rust-cache@v2 | |
with: | |
workspaces: "./src-tauri -> target" | |
key: rust-cache | |
- name: install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Run Clippy | |
run: | | |
mkdir ../dist | |
cargo clippy --workspace --all-targets --all-features |