forked from noir-lang/noir
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (76 loc) · 2.48 KB
/
test-acvm-js.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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@v4
- 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 -L .#acvm_js
- 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@v4
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: acvm-js
path: ./result
- name: Move build artifacts
run: |
mv ./result/acvm_js/nodejs ./acvm-repo/acvm_js/nodejs
mv ./result/acvm_js/web ./acvm-repo/acvm_js/web
- name: Set up test environment
uses: ./.github/actions/setup
- name: Run node tests
run: yarn workspace @noir-lang/acvm_js test
test-acvm_js-browser:
needs: [build-acvm-js-package]
name: Browser Tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: acvm-js
path: ./result
- name: Move build artifacts
run: |
mv ./result/acvm_js/nodejs ./acvm-repo/acvm_js/nodejs
mv ./result/acvm_js/web ./acvm-repo/acvm_js/web
- name: Set up test environment
uses: ./.github/actions/setup
- name: Install playwright deps
run: |
npx playwright install
npx playwright install-deps
- name: Run browser tests
working-directory: ./acvm-repo/acvm_js
run: yarn workspace @noir-lang/acvm_js test:browser