spec: Add Channel API contract, generator, and Emerald composition #995
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: Test | |
| on: | |
| merge_group: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| packages: read | |
| # If new code is pushed to a PR branch, then cancel in progress workflows for that PR. | |
| # Ensures that we don't waste CI time, and returns results quicker. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_TERM_COLOR: always | |
| CARGO_PROFILE_DEV_DEBUG: 1 | |
| CARGO_PROFILE_RELEASE_DEBUG: 1 | |
| RUST_BACKTRACE: full | |
| CARGO_NET_RETRY: 10 | |
| RUSTUP_MAX_RETRIES: 10 | |
| jobs: | |
| unit: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| code: | |
| - '**/*.rs' | |
| - 'Makefile' | |
| - '**/Cargo.toml' | |
| - '**/Cargo.lock' | |
| - '**/*.sh' | |
| - '*/workflows/test.yml' | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@cargo-nextest | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Run tests | |
| run: | | |
| cargo nextest run \ | |
| --workspace \ | |
| --all-features \ | |
| --no-fail-fast \ | |
| --failure-output final \ | |
| --filterset 'not package(emerald-mbt)' | |
| if: steps.filter.outputs.code == 'true' | |
| mbt: | |
| name: MBT Suite | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| # XXX: Do not block on MBT initially until we gain confidence CI is not | |
| # flaky for any reason. | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| code: | |
| - '**/*.rs' | |
| - '**/*.qnt' | |
| - 'Makefile' | |
| - '**/Cargo.toml' | |
| - '**/Cargo.lock' | |
| - '**/*.sh' | |
| - '*/workflows/test.yml' | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install Quint | |
| run: bun install -g @informalsystems/quint | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Run MBT suite | |
| run: make mbt-test | |
| if: steps.filter.outputs.code == 'true' |