-
Notifications
You must be signed in to change notification settings - Fork 107
128 lines (124 loc) · 3.46 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
name: Build o1js
on:
push:
branches:
- main
- berkeley
- develop
pull_request:
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@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build o1js and execute tests
env:
TEST_TYPE: ${{ matrix.test_type }}
continue-on-error: false
run: |
git submodule update --init --recursive
npm ci
npm run build
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@v4
- name: Setup Node
uses: actions/setup-node@v4
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 o1js 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@v3
continue-on-error: true
if: always()
with:
if-no-files-found: ignore
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@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build o1js
run: |
git submodule update --init --recursive
npm ci
npm run build
- 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@v4
- name: Setup Node
uses: actions/setup-node@v4
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 }}