fix: release.yml #921
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: Cargo Build & Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| tags: | |
| - v[0-9]+.* | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| env: | |
| CARGO_TERM_COLOR: always | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions-rs/toolchain@v1 | |
| timeout-minutes: 30 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| - run: rustup component add rustfmt | |
| - uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions-rs/toolchain@v1 | |
| timeout-minutes: 30 | |
| with: | |
| profile: minimal | |
| toolchain: nightly-2025-12-11 | |
| override: true | |
| - name: Install Dependencies | |
| run: sudo apt update && sudo apt install protobuf-compiler | |
| - run: rustup component add clippy | |
| - run: cargo clippy --all-targets -- -D warnings | |
| test: | |
| name: Cargo Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - nightly-2025-12-11 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Ziren toolchain | |
| run: curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/ProjectZKM/toolchain/refs/heads/main/setup.sh | sh | |
| - name: Install Dependencies | |
| run: sudo apt update && sudo apt install protobuf-compiler | |
| - name: Launch the Regtest | |
| run: cd scripts && docker compose up -d | |
| - name: Run all unit tests | |
| run: | | |
| set -e | |
| source ~/.zkm-toolchain/env | |
| cargo test -r --all --all-targets |