From d1188eb7dadb5a24c7dea1be06664d102c622961 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 11 May 2026 09:30:03 +0000 Subject: [PATCH] ci: add GitHub Actions workflow for cargo test, fmt, clippy, and go test Runs cargo test --workspace, cargo fmt --check, cargo clippy, and go test for poly-verified-go on push/PR. Clippy is non-blocking until the codebase is brought into compliance. --- .github/workflows/test.yml | 75 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4ee28a1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,75 @@ +name: test + +on: + push: + branches: + - main + - master + - "claude/**" + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +jobs: + rust-test: + name: cargo test (workspace) + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + shared-key: workspace + - run: cargo test --workspace --all-features --no-fail-fast + + rust-fmt: + name: cargo fmt --check + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - run: cargo fmt --all -- --check + + rust-clippy: + name: cargo clippy + runs-on: ubuntu-latest + timeout-minutes: 30 + # Clippy has never been enforced on this repo; surface findings without + # blocking other jobs until the codebase is brought into compliance. + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - uses: Swatinem/rust-cache@v2 + with: + shared-key: workspace + - run: cargo clippy --workspace --all-targets --all-features -- -D warnings + + go-test: + name: go test (poly-verified-go) + runs-on: ubuntu-latest + timeout-minutes: 15 + defaults: + run: + working-directory: poly-verified-go + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: poly-verified-go/go.mod + cache: false + - run: go vet ./... + - run: go test ./... -race -count=1