|
| 1 | +name: Test |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + types: [opened, reopened, ready_for_review] |
| 7 | + |
| 8 | +env: |
| 9 | + NOIR_VERSION: "1.0.0-beta.8" |
| 10 | + BB_VERSION: "1.0.0-nightly.20250723" |
| 11 | + NODE_VERSION: "24.3.0" |
| 12 | + |
| 13 | +jobs: |
| 14 | + test: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout code |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - name: Install nargo |
| 22 | + |
| 23 | + with: |
| 24 | + toolchain: ${{ env.NOIR_VERSION }} |
| 25 | + |
| 26 | + - name: Install bb |
| 27 | + run: | |
| 28 | + curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash || true |
| 29 | + echo /home/runner/.bb >> $GITHUB_PATH |
| 30 | + /home/runner/.bb/bbup -v ${{ env.BB_VERSION }} |
| 31 | + /home/runner/.bb/bb --version |
| 32 | +
|
| 33 | + - name: Setup Node.js |
| 34 | + uses: actions/setup-node@v4 |
| 35 | + with: |
| 36 | + node-version: ${{ env.NODE_VERSION }} |
| 37 | + |
| 38 | + - name: Install npm dependencies |
| 39 | + run: npm ci |
| 40 | + |
| 41 | + - name: Run lint |
| 42 | + run: npm run lint |
| 43 | + |
| 44 | + - name: Run noir tests |
| 45 | + run: | |
| 46 | + nargo test --package utils |
| 47 | + nargo test --package commitment_common |
| 48 | +
|
| 49 | + - name: Calculate cache key for compiled circuits |
| 50 | + id: circuits-cache-key |
| 51 | + run: echo "cache-key=$(find src/noir/{bin,lib} -type f -name "*.nr" -exec sha256sum {} + | sha256sum | awk '{print $1}')" >> $GITHUB_OUTPUT |
| 52 | + |
| 53 | + - name: Restore circuits cache |
| 54 | + uses: actions/cache/restore@v4 |
| 55 | + id: circuits-cache |
| 56 | + with: |
| 57 | + path: target |
| 58 | + key: circuits-${{ steps.circuits-cache-key.outputs.cache-key }} |
| 59 | + |
| 60 | + - name: Compile circuits |
| 61 | + if: steps.circuits-cache.outputs.cache-hit != 'true' |
| 62 | + run: ./scripts/ci-compile-circuits.sh |
| 63 | + |
| 64 | + - name: Save circuits cache |
| 65 | + uses: actions/cache/save@v4 |
| 66 | + if: steps.circuits-cache.outputs.cache-hit != 'true' |
| 67 | + with: |
| 68 | + path: target |
| 69 | + key: circuits-${{ steps.circuits-cache-key.outputs.cache-key }} |
| 70 | + |
| 71 | + - name: Run integration tests |
| 72 | + run: npm run test |
0 commit comments