forked from AcalaNetwork/bodhi.js
-
Notifications
You must be signed in to change notification settings - Fork 0
203 lines (187 loc) · 7.07 KB
/
test.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
name: Tests
on:
push:
paths-ignore:
- '**/README.md'
jobs:
cancel-prev-runs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
# Only cancel non-master branch runs
if: ${{ github.ref != 'refs/heads/master' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
eth-providers:
runs-on: [self-hosted, linux]
needs: cancel-prev-runs
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: prune outdated docker stuff
run: yes | docker system prune --filter 'until=240h'
- name: check docker info before cleaning
run: docker ps && docker volume ls
- name: clean up docker process and volumes
run: docker compose down -v
- name: check docker info after cleaning
run: docker ps && docker volume ls
- name: build bodhi base # if use self-hosted machine can utilize cache
run: docker build . -t bodhi-base -f docker/bodhi-base.Dockerfile
- name: test
run: docker compose up --remove-orphans --abort-on-container-exit --exit-code-from=eth-providers-test --build -- eth-providers-test
- name: clean up after tests finished
run: docker compose down -v
- name: check docker info after cleaning
run: docker ps && docker volume ls
- name: dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
eth-rpc-adaptor:
runs-on: [self-hosted, linux]
needs: cancel-prev-runs
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: prune outdated docker stuff
run: yes | docker system prune --filter 'until=240h'
- name: check docker info before cleaning
run: docker ps && docker volume ls
- name: clean up docker process and volumes
run: docker compose down -v
- name: check docker info after cleaning
run: docker ps && docker volume ls
- name: build bodhi base # if use self-hosted machine can utilize cache
run: docker build . -t bodhi-base -f docker/bodhi-base.Dockerfile
- name: test
run: docker compose up --remove-orphans --abort-on-container-exit --exit-code-from=eth-rpc-adapter-test --build -- eth-rpc-adapter-test
- name: clean up after tests finished
run: docker compose down -v
- name: check docker info after cleaning
run: docker ps && docker volume ls
- name: dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
waffle-examples:
runs-on: [self-hosted, linux]
needs: cancel-prev-runs
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: prune outdated docker stuff
run: yes | docker system prune --filter 'until=240h'
- name: check docker info before cleaning
run: docker ps && docker volume ls
- name: clean up docker process and volumes
run: docker compose down -v
- name: check docker info after cleaning
run: docker ps && docker volume ls
- name: build bodhi base # if use self-hosted machine can utilize cache
run: docker build . -t bodhi-base -f docker/bodhi-base.Dockerfile
- name: test
run: docker compose up --remove-orphans --abort-on-container-exit --exit-code-from=waffle-examples-test --build -- waffle-examples-test
- name: clean up after tests finished
run: docker compose down -v
- name: check docker info after cleaning
run: docker ps && docker volume ls
- name: dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
# waffle-tutorials:
# runs-on: ubuntu-latest
# needs: cancel-prev-runs
# steps:
# - name: checkout
# uses: actions/checkout@v2
# with:
# submodules: 'recursive'
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# - name: check docker info before cleaning
# run: docker ps && docker volume ls
# - name: build bodhi base # if use self-hosted machine can utilize cache
# run: docker build . -t bodhi-base -f docker/bodhi-base.Dockerfile#
# - name: test
# run: docker compose up --remove-orphans --abort-on-container-exit --exit-code-from=waffle-tutorials-test --build -- waffle-tutorials-test
# - name: dump docker logs on failure
# if: failure()
# uses: jwalton/gh-docker-logs@v1
hardhat-tutorials:
runs-on: ubuntu-latest
needs: cancel-prev-runs
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: check docker info before cleaning
run: docker ps && docker volume ls
- name: build bodhi base # if use self-hosted machine can utilize cache
run: docker build . -t bodhi-base -f docker/bodhi-base.Dockerfile
- name: test
run: docker compose up --remove-orphans --abort-on-container-exit --exit-code-from=hardhat-tutorials-test --build -- hardhat-tutorials-test
- name: dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
truffle-tutorials:
runs-on: ubuntu-latest
needs: cancel-prev-runs
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: check docker info before cleaning
run: docker ps && docker volume ls
- name: build bodhi base # if use self-hosted machine can utilize cache
run: docker build . -t bodhi-base -f docker/bodhi-base.Dockerfile
- name: test
run: docker compose up --remove-orphans --abort-on-container-exit --exit-code-from=truffle-tutorials-test --build -- truffle-tutorials-test
- name: dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v1
bodhi:
runs-on: ubuntu-latest
needs: cancel-prev-runs
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: setup node env
uses: actions/setup-node@v2
with:
node-version: '14.16.0'
- name: install dependencies
run: node common/scripts/install-run-rush.js update
- name: build
run: node common/scripts/install-run-rush.js build -t @acala-network/bodhi
- name: test
run: cd bodhi && yarn test
env:
NPM_TOKEN: doesnt-matter
eth-transactions:
runs-on: ubuntu-latest
needs: cancel-prev-runs
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: setup node env
uses: actions/setup-node@v2
with:
node-version: '14.16.0'
- name: install dependencies
run: node common/scripts/install-run-rush.js update
- name: build
run: node common/scripts/install-run-rush.js build -t @acala-network/eth-transactions
- name: test
run: cd eth-transactions && yarn test