forked from noir-lang/noir
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (60 loc) · 1.92 KB
/
test-abi_wasm.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
name: ABI Wasm test
on:
pull_request:
merge_group:
push:
branches:
- master
# 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:
runs-on: ubuntu-latest
env:
CACHED_PATH: /tmp/nix-cache
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-23.05
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: barretenberg
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Build noirc_abi_wasm
run: |
nix build -L .#noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/nodejs ./tooling/noirc_abi_wasm
cp -r ./result/noirc_abi_wasm/web ./tooling/noirc_abi_wasm
- name: Dereference symlink
run: echo "UPLOAD_PATH=$(readlink -f ./result/noirc_abi_wasm)" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: noirc_abi_wasm
path: ${{ env.UPLOAD_PATH }}
retention-days: 10
test:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Download wasm package artifact
uses: actions/download-artifact@v3
with:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm
- name: Install Yarn dependencies
uses: ./.github/actions/setup
- name: Run node tests
run: yarn workspace @noir-lang/noirc_abi test
- name: Install Playwright
uses: ./.github/actions/install-playwright
- name: Run browser tests
run: yarn workspace @noir-lang/noirc_abi test:browser