feat: train integration example #1
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 | |
| env: | |
| AZTEC_VERSION: 1.1.2 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Fetch all history for comparison | |
| - name: Set up Docker | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Check for changes in src/ | |
| uses: dorny/paths-filter@v3 | |
| id: changes | |
| with: | |
| filters: | | |
| src: | |
| - 'src/**' | |
| - 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=$AZTEC_VERSION aztec-up | |
| - name: Start sandbox | |
| run: | | |
| aztec start --sandbox & | |
| - name: Install project dependencies | |
| run: yarn | |
| - name: Compile | |
| run: script -e -c "${AZTEC_NARGO:-aztec-nargo} compile" | |
| - name: Codegen | |
| run: script -e -c "aztec codegen target --outdir src/artifacts" | |
| - name: Start PXE | |
| run: | | |
| VERSION=$AZTEC_VERSION aztec start --port 8081 --pxe --pxe.nodeUrl=http://localhost:8080/ --pxe.proverEnabled false & | |
| - name: Run nr tests | |
| run: | | |
| script -e -c "aztec test" | |
| - 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" |