add test logic #32
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, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # ---------- rustfmt ---------- | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: { components: rustfmt } | |
| - run: cargo fmt --all -- --check | |
| # ---------- Tests (independent) ---------- | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Rust toolchain | |
| - uses: dtolnay/rust-toolchain@stable | |
| # Cache Cargo deps | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| # ---------- Build all Noir circuits ---------- | |
| - name: Generate proofs & VKs | |
| run: tests/build_circuits.sh | |
| # ---------- Run Rust tests ---------- | |
| - name: Run tests | |
| run: cargo test --verbose | |