Merge branch 'dev' into chore/dependabot #47
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: ${{ github.workflow }}-${{ github.ref_name }} | |
| 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@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install and cache yarn | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'yarn' | |
| - name: Cache node_modules | |
| uses: actions/cache@v5 | |
| 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: Update Aztec | |
| run: | | |
| aztec-up ${{ steps.aztec-version.outputs.version }} | |
| - name: Cache Noir compilation artifacts | |
| id: cache-noir | |
| uses: actions/cache@v5 | |
| 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: yarn compile | |
| - name: Generate artifacts | |
| if: steps.cache-noir.outputs.cache-hit != 'true' | |
| run: yarn codegen -f | |
| - name: Run nr tests | |
| run: yarn test:nr | |
| - name: Clear Vite/Vitest cache | |
| run: rm -rf node_modules/.vite node_modules/.vitest | |
| - name: Run js tests | |
| run: yarn test:js |