-
Notifications
You must be signed in to change notification settings - Fork 39
184 lines (160 loc) · 5.11 KB
/
tests.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
name: Tests
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
- v[0-9]+\.[0-9]+-dev
schedule:
- cron: '30 4 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Determine changed packages
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
runs-on: ubuntu-latest
outputs:
js-packages: ${{ steps.filter-js.outputs.changes }}
rs-packages: ${{ steps.filter-rs.outputs.changes }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dorny/paths-filter@v2
id: filter-js
with:
filters: .github/package-filters/js-packages.yml
- uses: dorny/paths-filter@v2
id: filter-rs
with:
filters: .github/package-filters/rs-packages.yml
build-js:
name: Build JS packages
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
secrets: inherit
uses: ./.github/workflows/tests-build-js.yml
build-images:
name: Build Platform Docker images
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
secrets: inherit
uses: ./.github/workflows/tests-build-images.yml
rs-package:
name: Rust package
needs:
- changes
secrets: inherit
strategy:
fail-fast: false
matrix:
rs-package: ${{ fromJson(needs.changes.outputs.rs-packages) }}
uses: ./.github/workflows/tests-rs-package.yml
with:
package: ${{ matrix.rs-package }}
rs-crates-security:
name: Rust crates security audit
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
runs-on: ubuntu-22.04
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Audit crates
uses: rustsec/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
js-package:
name: JS package
needs:
- changes
- build-js
secrets: inherit
strategy:
fail-fast: false
matrix:
js-package: ${{ fromJson(needs.changes.outputs.js-packages) }}
uses: ./.github/workflows/tests-js-package.yml
with:
package: ${{ matrix.js-package }}
skip-tests: ${{ contains(matrix.js-package, 'platform-test-suite') }}
js-deps-versions:
name: JS dependency versions check
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
runs-on: ubuntu-22.04
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup Node.JS
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Enable corepack
run: corepack enable
- name: Validate workspaces
run: yarn constraints
js-npm-security:
name: JS NPM security audit
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }}
runs-on: ubuntu-22.04
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Audit NPM
run: yarn npm audit --environment production --all --recursive
js-codeql:
name: JS code security audit
needs: build-js
secrets: inherit
uses: ./.github/workflows/tests-codeql.yml
dashmate-local-network:
name: Dashmate local network E2E tests
secrets: inherit
needs:
- changes
- build-images
uses: ./.github/workflows/tests-dashmate.yml
with:
test-pattern: test/e2e/localNetwork.spec.js
if: contains(needs.changes.outputs.js-packages, 'dashmate')
dashmate-fullnode:
name: Dashmate full node E2E tests
secrets: inherit
needs:
- changes
- build-images
uses: ./.github/workflows/tests-dashmate.yml
with:
test-pattern: test/e2e/testnetHPFullnode.spec.js
if: contains(needs.changes.outputs.js-packages, 'dashmate')
dashmate-evonode:
name: Dashmate Evonode E2E tests
secrets: inherit
needs:
- changes
- build-images
uses: ./.github/workflows/tests-dashmate.yml
with:
test-pattern: test/e2e/testnetHPFullnode.spec.js
if: contains(needs.changes.outputs.js-packages, 'dashmate')
test-suite:
name: Test Suite
needs:
- build-js
- build-images
secrets: inherit
uses: ./.github/workflows/tests-test-suite.yml
with:
command: test:suite -b
test-suite-browser:
name: Test Suite in browser
needs:
- build-js
- build-images
secrets: inherit
uses: ./.github/workflows/tests-test-suite.yml
with:
command: test:browsers