Repository navigation
chore(deps-dev): bump vitest from 2.1.9 to 4.1.11 #89
Workflow file for this run
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: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| env: | |
| # CI never touches live services. Everything runs against the sandbox on recorded fixtures. | |
| RECOURSE_MODE: sandbox | |
| jobs: | |
| contract: | |
| name: Contract — build and test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Immutable commit SHA corresponding to dtolnay/rust-toolchain v1 release tag | |
| - name: Install Rust (1.95.0) | |
| uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1 | |
| with: | |
| toolchain: "1.95.0" | |
| targets: wasm32-unknown-unknown | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Unit tests | |
| run: cargo test --manifest-path contracts/recourse/Cargo.toml --lib | |
| - name: Invariant property tests | |
| run: cargo test --manifest-path contracts/recourse/Cargo.toml --test invariants | |
| - name: Build wasm | |
| run: cargo build --manifest-path contracts/recourse/Cargo.toml --target wasm32-unknown-unknown --release | |
| typescript: | |
| name: TypeScript — typecheck, lint, test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm typecheck | |
| - run: pnpm lint | |
| - run: pnpm test:services | |
| judge: | |
| name: Judge script | |
| runs-on: ubuntu-latest | |
| needs: [contract, typescript] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Immutable commit SHA corresponding to dtolnay/rust-toolchain v1 release tag | |
| - uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1 | |
| with: | |
| toolchain: "1.95.0" | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| # The headline check: a fresh clone, no keys, 7/7 PASS and solvency OK. | |
| - name: npm run judge | |
| run: npm run judge | |
| secrets: | |
| name: No secrets in repo or history | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: gitleaks | |
| uses: gitleaks/gitleaks-action@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |