Update transaction file for interpreter #1811
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: Protocols Tests | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| - beta | |
| - nightly | |
| steps: | |
| - name: Update Rust to ${{ matrix.toolchain }} | |
| run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-test-environment | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run unit tests (Debug) | |
| run: cargo test --verbose | |
| - name: Run Turnt tests for interpreter | |
| run: turnt --env interp $(find . -type f -name '*.tx') | |
| - name: Run Turnt tests for monitor | |
| run: turnt --env monitor $(find . -type f -name '*.prot') | |
| msrv: | |
| name: Check Minimum Rust Version for protocols library | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/cache-cargo-install-action@v2 | |
| with: | |
| tool: cargo-msrv | |
| - name: Check MSRV | |
| working-directory: protocols | |
| run: cargo msrv verify | |
| format: | |
| name: Check Formatting | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: cargo fmt --check | |
| clippy: | |
| name: Clippy Lints | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| env: | |
| # Pin Rust version to prevent new Clippy lints from breaking CI | |
| RUST_VERSION: "1.91.0" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust ${{ env.RUST_VERSION }} | |
| run: | | |
| rustup toolchain install ${{ env.RUST_VERSION }} --component clippy | |
| rustup default ${{ env.RUST_VERSION }} | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| python-checks: | |
| name: Type-check, lint & format Python files | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-uv | |
| - name: Use ty to typecheck python files | |
| run: uv run --group dev ty check | |
| - name: Use ruff to lint Python files | |
| run: uv run --group dev ruff check | |
| - name: Use ruff (via uv) to format Python files | |
| # We pass in `--preview-features format` to suppress | |
| # uv's warning messages about the formatter being experimental | |
| run: uv format --check --preview-features format | |
| benchmark: | |
| name: Performance Benchmarks | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history to access baseline | |
| - uses: ./.github/actions/setup-test-environment | |
| - name: Install hyperfine | |
| run: | | |
| wget https://github.com/sharkdp/hyperfine/releases/download/v1.19.0/hyperfine_1.19.0_amd64.deb | |
| sudo dpkg -i hyperfine_1.19.0_amd64.deb | |
| - name: Build monitor (release) | |
| run: cargo build --release --package protocols-monitor | |
| - name: Run benchmarks | |
| run: uv run scripts/benchmark_monitor.py | |
| - name: Check for performance regressions | |
| run: uv run scripts/check_performance_regression.py |