ci: fix the two failures that kept every main push red #33
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| # Cancel superseded runs on the same ref to save CI minutes. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| js: | |
| name: Frontend (vitest + build) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| # Lock files are gitignored in this repo, so install without one | |
| # (setup-node's cache also requires a committed lock file). | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Unit tests | |
| run: npm run test:js | |
| - name: Type-check + build | |
| run: npm run build | |
| rust: | |
| name: Backend (fmt + clippy + cargo test) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: src-tauri | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Tauri v2 Linux build/test dependencies. | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| librsvg2-dev \ | |
| libayatana-appindicator3-dev \ | |
| libsoup-3.0-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| - name: Format check | |
| run: cargo fmt -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Tests | |
| run: cargo test | |
| # Coverage is reported for visibility but does not gate the build. | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Coverage summary | |
| run: cargo llvm-cov --summary-only |