-
Notifications
You must be signed in to change notification settings - Fork 118
130 lines (126 loc) · 3.48 KB
/
build-action.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Build SnarkyJS
on:
push:
branches:
- main
- berkeley
- develop
pull_request:
branches:
- main
- berkeley
- develop
workflow_dispatch: {}
jobs:
Build-And-Test-Server:
timeout-minutes: 210
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test_type:
[
'Simple integration tests',
'DEX integration tests',
'DEX integration test with proofs',
'Voting integration tests',
'Unit tests',
'Verification Key Regression Check',
'CommonJS test',
]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Build SnarkyJS and Execute Tests
env:
TEST_TYPE: ${{ matrix.test_type }}
continue-on-error: false
run: |
git submodule update --init --recursive
npm ci
npm run build:node
touch profiling.md
sh run-ci-tests.sh
cat profiling.md >> $GITHUB_STEP_SUMMARY
Build-And-Test-Web:
timeout-minutes: 90
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Node Dependencies
run: |
git submodule update --init --recursive
npm ci
- name: Install Playwright Browsers
run: npm run e2e:install
- name: Build SnarkyJS and Prepare the Web Server
run: |
npm run build:web
npm run e2e:prepare-server
- name: Execute E2E Tests
run: npm run test:e2e
- name: Upload E2E Test Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: e2e-tests-report
path: tests/report/
retention-days: 30
Release-on-NPM:
timeout-minutes: 180
runs-on: ubuntu-latest
needs: [Build-And-Test-Server, Build-And-Test-Web]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Build SnarkyJS
run: |
git submodule update --init --recursive
npm ci
npm run build:node
- name: Publish to NPM if version has changed
uses: JS-DevTools/npm-publish@v1
if: github.ref == 'refs/heads/main'
with:
token: ${{ secrets.NPM_TOKEN }}
env:
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}
Release-mina-signer-on-NPM:
timeout-minutes: 180
runs-on: ubuntu-latest
needs: [Build-And-Test-Server, Build-And-Test-Web]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Build mina-signer
run: |
git submodule update --init --recursive
npm ci
cd src/mina-signer
npm ci
npm run prepublishOnly
- name: Publish to NPM if version has changed
uses: JS-DevTools/npm-publish@v1
if: github.ref == 'refs/heads/main'
with:
token: ${{ secrets.NPM_TOKEN }}
package: './src/mina-signer/package.json'
env:
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }}