From 7444e4b7c099b406f88d518df076bab53a77d137 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sun, 24 May 2026 14:12:03 +0000 Subject: [PATCH] ci: add build verification step before running tests - Add rust-build job that compiles the full Rust workspace before tests run - Add TypeScript type-check for the dashboard using tsc --noEmit - rust-tests job now depends on rust-build to catch compile errors early --- .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfb04f22..1ed0c54c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,10 +75,62 @@ jobs: bandit-report.json safety-report.json + # Build Verification — ensure the Rust workspace compiles cleanly before running tests. + # Catches type errors, missing imports, and dependency resolution issues early. + rust-build: + name: Rust Build Check + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Tauri / GTK / serial system dev libraries + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libglib2.0-dev \ + libgtk-3-dev \ + libsoup-3.0-dev \ + libjavascriptcoregtk-4.1-dev \ + libwebkit2gtk-4.1-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + libxdo-dev \ + libudev-dev \ + libdbus-1-dev \ + libssl-dev \ + pkg-config + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + v2/target + key: ${{ runner.os }}-cargo-build-${{ hashFiles('v2/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-build- + + - name: Build Rust workspace + working-directory: v2 + run: cargo build --workspace --no-default-features + + - name: TypeScript type-check (dashboard) + if: success() + run: | + cd ${{ github.workspace }}/dashboard + npm ci + npx tsc --noEmit + # Rust Workspace Tests rust-tests: name: Rust Workspace Tests runs-on: ubuntu-latest + needs: [rust-build] steps: - name: Checkout code uses: actions/checkout@v4