This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
chore: keep ACVM JS in sync with ACVM version #81
Workflow file for this run
This file contains 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: Test acvm_js | |
on: [push, pull_request] | |
# This will cancel previous runs when a branch or PR is updated | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build-acvm-js-package: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v20 | |
with: | |
nix_path: nixpkgs=channel:nixos-22.11 | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: barretenberg | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- name: Build acvm-js | |
run: | | |
nix build .# | |
- name: Dereference symlink | |
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: acvm-js | |
path: ${{ env.UPLOAD_PATH }} | |
retention-days: 3 | |
test-acvm_js-node: | |
needs: [build-acvm-js-package] | |
name: Node.js Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: acvm-js | |
path: ./result | |
- name: Set up test environment | |
uses: ./.github/actions/setup | |
with: | |
working-directory: ./acvm_js | |
- name: Run node tests | |
working-directory: ./acvm_js | |
run: yarn test | |
test-acvm_js-browser: | |
needs: [build-acvm-js-package] | |
name: Browser Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: acvm-js | |
path: ./result | |
- name: Set up test environment | |
uses: ./.github/actions/setup | |
with: | |
working-directory: ./acvm_js | |
- name: Install playwright deps | |
working-directory: ./acvm_js | |
run: | | |
npx playwright install | |
npx playwright install-deps | |
- name: Run browser tests | |
working-directory: ./acvm_js | |
run: yarn test:browser |