This repository was archived by the owner on Jul 10, 2026. It is now read-only.
ci: fix commenting on prs from forks #55
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: Tests | ||
| on: [push] | ||
| concurrency: | ||
| group: pr-${{ github.head_ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| setup-and-run: | ||
| name: Setup and run tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install and cache yarn | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'yarn' | ||
| - name: Cache node_modules | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: node_modules | ||
| key: ${{ runner.os }}-node-modules-${{ hashFiles('yarn.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-node-modules- | ||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
| - name: Detect Aztec version | ||
| id: aztec-version | ||
| run: | | ||
| AZTEC_VERSION=$(node -p "require('./package.json').config.aztecVersion") | ||
| echo "version=$AZTEC_VERSION" >> "$GITHUB_OUTPUT" | ||
| echo "Aztec version is $AZTEC_VERSION" | ||
| - name: Install Aztec CLI | ||
| run: | | ||
| curl -s https://install.aztec.network > tmp.sh | ||
| VERSION=${{ steps.aztec-version.outputs.version }} bash tmp.sh <<< yes "yes" | ||
| - name: Update path | ||
| run: echo "/home/runner/.aztec/bin" >> $GITHUB_PATH | ||
| - name: Cache Noir compilation artifacts | ||
| id: cache-noir | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| target/ | ||
| src/artifacts/ | ||
| key: ${{ runner.os }}-noir-${{ env.AZTEC_VERSION }}-${{ hashFiles('src/nr/**/*', 'Nargo.toml') }} | ||
| - name: Compile contracts | ||
| if: steps.cache-noir.outputs.cache-hit != 'true' | ||
| run: script -e -c "${AZTEC_NARGO:-aztec-nargo} compile" | ||
| - name: Generate artifacts | ||
| if: steps.cache-noir.outputs.cache-hit != 'true' | ||
| run: script -e -c "aztec codegen target --outdir src/artifacts" | ||
| - name: Run nr tests | ||
| run: yarn test:nr | ||
| - name: Run js tests | ||
| run: yarn test:js | ||