-
Notifications
You must be signed in to change notification settings - Fork 3
153 lines (139 loc) · 4.51 KB
/
build.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: "Build"
on:
push:
branches:
- "1.x"
tags:
- v1*
paths-ignore:
- "docs/**"
- "assets/**"
- "**.md"
pull_request:
branches:
- "1.x"
types: [opened, reopened, synchronize]
paths-ignore:
- "docs/**"
- "assets/**"
- "**.md"
jobs:
lint:
runs-on: ubuntu-latest
env:
TEST: "build_and_lint"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache-deps
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-node14-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: bash ./scripts/ci.sh
unit:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
env:
TEST: "unit"
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache-deps
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: bash ./scripts/ci.sh
e2e:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testCmd:
[
'unit_and_e2e_clients',
'e2e_browsers',
'e2e_ganache',
'e2e_mosaic',
#'e2e_gnosis_dex',
]
env:
TEST: ${{ matrix.testCmd }}
INFURA_HTTP: ${{ secrets.INFURA_HTTP }}
steps:
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/checkout@v2
- uses: browser-actions/setup-firefox@latest
if: matrix.testCmd == 'e2e_browsers'
- uses: actions/cache@v2
id: cache-deps
if: env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers'
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-node14-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
if: (env.TEST == 'unit_and_e2e_clients' || env.TEST == 'e2e_browsers') && steps.cache-deps.outputs.cache-hit != 'true'
- run: bash ./scripts/ci.sh
- name: Send coverage reports to Coveralls
if: env.TEST == 'unit_and_e2e_clients'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
e2e_windows:
runs-on: windows-latest
env:
TEST: "e2e_windows"
INFURA_HTTP: ${{ secrets.INFURA_HTTP }}
INFURA_WSS: ${{ secrets.INFURA_WSS }}
steps:
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: actions/checkout@v2
- run: bash ./scripts/ci.sh
eth2:
runs-on: ubuntu-latest
strategy:
matrix:
node: [14, 16, 18]
env:
TEST: "eth2"
steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache-deps
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-node${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
- run: npm ci
if: steps.cache-deps.outputs.cache-hit != 'true'
- run: bash ./scripts/ci.sh
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'