From c9adcaa5e4999d51cd7a46ebef3547cab29e704e Mon Sep 17 00:00:00 2001 From: funman300 Date: Mon, 6 Jul 2026 16:21:19 -0700 Subject: [PATCH 1/2] ci: add workspace clippy + test gate workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Until now no CI workflow ran the test suite or clippy at all — the android-release, docker-build, web-e2e, web-wasm-rebuild, and builder-image workflows cover packaging and e2e, but a direct push to master (including the web-wasm-rebuild bot commit) never executed cargo test or clippy. The gate discipline in CLAUDE.md §6 existed only on developer machines. test.yml runs the exact §6 commands (clippy --workspace --all-targets -D warnings; cargo test --workspace) on master pushes and PRs, with SQLX_OFFLINE against the checked-in .sqlx cache, path-filtered so docs-only merges don't burn CI. Toolchain/cache mirror web-e2e.yml. Found during the 2026-07-06 large-scale review (finding H1). Co-Authored-By: Claude Fable 5 --- .gitea/workflows/test.yml | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..ccaf04b --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,56 @@ +# Workspace gate: the same clippy + test commands CLAUDE.md §6 requires +# locally, run on every master push and pull request. Until this workflow +# existed, nothing in CI ran the test suite at all — a direct push to +# master (or the web-wasm-rebuild bot commit) was entirely unguarded. +name: Test + +on: + push: + branches: [master] + paths: + - 'solitaire_app/**' + - 'solitaire_assetgen/**' + - 'solitaire_core/**' + - 'solitaire_data/**' + - 'solitaire_engine/**' + - 'solitaire_server/src/**' + - 'solitaire_server/tests/**' + - 'solitaire_server/migrations/**' + - 'solitaire_sync/**' + - 'solitaire_wasm/**' + - 'solitaire_web/**' + - 'Cargo.toml' + - 'Cargo.lock' + - '.cargo/**' + - '.sqlx/**' + - '.gitea/workflows/test.yml' + pull_request: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + + - name: Cache cargo build + uses: Swatinem/rust-cache@v2 + + # SQLX_OFFLINE uses the checked-in `.sqlx/` query cache (no live DB), + # same as the web-e2e workflow's server prebuild. + - name: Clippy (deny warnings) + env: + SQLX_OFFLINE: 'true' + run: cargo clippy --workspace --all-targets -- -D warnings + + - name: Test + env: + SQLX_OFFLINE: 'true' + run: cargo test --workspace -- 2.47.3 From f6e57b759e3fb47293e386462eb311385edd70a9 Mon Sep 17 00:00:00 2001 From: funman300 Date: Mon, 6 Jul 2026 16:28:28 -0700 Subject: [PATCH 2/2] ci: pin toolchain to 1.95.0 and install Bevy native deps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review feedback on #135: floating 'stable' + -D warnings lets every new clippy release redden master with new lints — pin 1.95.0 like the web-wasm-rebuild workflow. And ubuntu-latest lacks the ALSA/udev/X11/ Wayland dev packages the Bevy crates link against; install the standard Bevy CI set (the project's own builder images have no desktop-Bevy precedent — android-builder targets the NDK and web-e2e only builds the server). Co-Authored-By: Claude Fable 5 --- .gitea/workflows/test.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index ccaf04b..0593e8e 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -35,14 +35,24 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install Rust - uses: dtolnay/rust-toolchain@stable + - name: Install Rust 1.95.0 + uses: dtolnay/rust-toolchain@master with: + toolchain: 1.95.0 components: clippy - name: Cache cargo build uses: Swatinem/rust-cache@v2 + # Native link deps for the Bevy crates (engine/app/web) on a bare + # ubuntu runner: ALSA + udev for input/audio, X11 + Wayland for winit. + - name: Install Bevy native dependencies + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libasound2-dev libudev-dev pkg-config libx11-dev libxcursor-dev \ + libxrandr-dev libxi-dev libwayland-dev libxkbcommon-dev + # SQLX_OFFLINE uses the checked-in `.sqlx/` query cache (no live DB), # same as the web-e2e workflow's server prebuild. - name: Clippy (deny warnings) -- 2.47.3