Merge pull request #1 from masaun/develop #9
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: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: pr-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| setup-and-run: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest-m] | |
| threads: [12] | |
| runs-on: | |
| labels: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| concurrency: | |
| group: job-${{ github.head_ref }}-${{ matrix.os }}-${{ matrix.threads }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Fetch all history for comparison | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.17.0" | |
| - name: Set up Docker | |
| uses: docker/setup-buildx-action@v2 | |
| - 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 ${{ steps.aztec-version.outputs.version }}" | |
| - name: Install Aztec CLI | |
| run: | | |
| curl -s https://install.aztec.network > tmp.sh | |
| bash tmp.sh <<< yes "yes" | |
| - name: Update path | |
| run: echo "/home/runner/.aztec/bin" >> $GITHUB_PATH | |
| - name: Set Aztec version | |
| run: | | |
| VERSION=${{ steps.aztec-version.outputs.version }} aztec-up | |
| - name: Start sandbox | |
| run: | | |
| aztec start --sandbox & | |
| - name: Install project dependencies | |
| run: yarn --frozen-lockfile | |
| - name: Compile | |
| run: yarn compile | |
| - name: Codegen | |
| run: yarn codegen | |
| - name: Start PXE | |
| run: | | |
| VERSION=${{ steps.aztec-version.outputs.version }} aztec start --port 8081 --pxe --pxe.nodeUrl=http://localhost:8080/ --pxe.proverEnabled false & | |
| - name: Run nr tests | |
| run: | | |
| script -e -c "aztec test --test-threads ${{ matrix.threads }}" | |
| - name: Run js tests | |
| run: script -e -c "BASE_PXE_URL=http://localhost NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --config jest.integration.config.json" |