forked from o1-labs/docs2
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (87 loc) · 2.71 KB
/
test-tutorials.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
98
99
100
101
102
103
104
name: Test-Tutorials
on:
push:
branches:
- main
workflow_dispatch: {}
jobs:
test-tutorials:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
example-path:
- examples/zkapps/01-hello-world
- examples/zkapps/02-private-inputs-and-hash-functions
- examples/zkapps/05-common-types-and-functions
- examples/zkapps/09-recursion
- examples/zkapps/10-account-updates
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set Git config (global)
run: |
git config --global user.email "[email protected]"
git config --global user.name "Test"
- name: Install dependencies, build and run ${{ matrix.example-path }}/build/src/main.js
run: |
cd ${{ matrix.example-path }}
npm ci
npm run build
example_path="${{ matrix.example-path }}"
if [[ "$example_path" == "examples/zkapps/09-recursion" ]]; then
node build/src/vote.js
node build/src/rollup.js
else
node build/src/main.js
fi
test-features:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies, build and test
run: |
cd examples/zkapps/feature-overview
npm ci
npm run test
build-tutorials:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22]
example-path:
- examples/zkapps/04-zkapp-browser-ui
- examples/zkapps/07-oracles
- examples/zkapps/anonymous-message-board
- examples/zkapps/interacting-with-zkApps-server-side
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set Git config (global)
run: |
git config --global user.email "[email protected]"
git config --global user.name "Test"
- name: Install dependencies and build ${{ matrix.example-path }}
run: |
cd ${{ matrix.example-path }}
if [ -d "contracts" ]; then
cd contracts
fi
npm ci
npm run build