test: add recording assertion messages (#737) #39
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: Tests | |
| # ------------------------------------------------------------------------------ | |
| # Workflow Settings | |
| # ------------------------------------------------------------------------------ | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| debug: | |
| description: "Enable verbose test output (V=1)" | |
| required: false | |
| type: boolean | |
| default: false | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| permissions: {} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| V: ${{ inputs.debug && '1' || '' }} | |
| jobs: | |
| # ---------------------------------------------------------------------------- | |
| # Lint (fmt + clippy) | |
| # ---------------------------------------------------------------------------- | |
| lint: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Install nightly Rust (for rustfmt) | |
| uses: ./.github/actions/install-nightly-rust | |
| with: | |
| components: rustfmt | |
| - name: Install stable Rust | |
| uses: dtolnay/rust-toolchain@6190aa5fb88a88ee71c12769924bbe63a9ab152e # 1.96.0 | |
| with: | |
| components: clippy | |
| - name: Cache Cargo registry and build artifacts | |
| uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index | |
| ~/.cargo/registry/cache | |
| ~/.cargo/git/db | |
| target | |
| key: ${{ runner.os }}-rust-1.96.0-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-rust-1.96.0-cargo- | |
| save-always: true | |
| - name: Install cargo-machete | |
| run: cargo install cargo-machete --locked | |
| - name: Lint | |
| run: make lint | |
| # ---------------------------------------------------------------------------- | |
| # Build + test | |
| # ---------------------------------------------------------------------------- | |
| test: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Install stable Rust | |
| uses: dtolnay/rust-toolchain@6190aa5fb88a88ee71c12769924bbe63a9ab152e # 1.96.0 | |
| - name: Cache Cargo registry and build artifacts | |
| uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index | |
| ~/.cargo/registry/cache | |
| ~/.cargo/git/db | |
| target | |
| key: ${{ runner.os }}-rust-1.96.0-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-rust-1.96.0-cargo- | |
| save-always: true | |
| - name: Unit tests | |
| run: make test-unit |