forked from stereum-dev/ethereum-node
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (94 loc) · 3.2 KB
/
test-integration.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
name: Tests Integration
on:
push:
branches: [main]
workflow_dispatch:
jobs:
setup:
runs-on: ubuntu-22.04
outputs:
importTests: ${{ steps.get-import-tests.outputs.tests }}
ELTests: ${{ steps.get-EL-tests.outputs.tests }}
otherTests: ${{ steps.get-other-tests.outputs.tests }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "19"
- run: npm install
working-directory: ./launcher
- id: get-import-tests
name: Get Import Tests
run: echo "::set-output name=tests::$(npx jest --listTests --json | jq -cM '[.[] | select(contains(".int") and contains("Beacon")) | split("/") | .[length-1:][]] | to_entries | map({id:.key, name:.value})')"
working-directory: ./launcher
- id: get-EL-tests
name: Get EL Tests
run: echo "::set-output name=tests::$(npx jest --listTests --json | jq -cM '[.[] | select(contains(".int") and contains("Service") and (contains("Beacon") | not )) | split("/") | .[length-1:][]] | to_entries | map({id:.key, name:.value})')"
working-directory: ./launcher
- id: get-other-tests
name: Get Other Tests
run: echo "::set-output name=tests::$(npx jest --listTests --json | jq -cM '[.[] | select(contains(".int") and (contains("Service") | not )) | split("/") | .[length-1:][]] | to_entries | map({id:.key, name:.value})')"
working-directory: ./launcher
Validator-Import-test:
runs-on: ubuntu-22.04
name: test ${{ matrix.test.name }}
needs:
- setup
- Other-Integration-test
- Execution-Client-test
strategy:
matrix:
test: ${{ fromJson(needs.setup.outputs.importTests) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "19"
- run: npm install
working-directory: ./launcher
- run: npm run test ${{ matrix.test.name }}
working-directory: ./launcher
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
IS_DEV: "true"
Execution-Client-test:
runs-on: ubuntu-22.04
name: test ${{ matrix.test.name }}
needs:
- setup
- Other-Integration-test
strategy:
matrix:
test: ${{ fromJson(needs.setup.outputs.ELTests) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "19"
- run: npm install
working-directory: ./launcher
- run: npm run test ${{ matrix.test.name }}
working-directory: ./launcher
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
IS_DEV: "true"
Other-Integration-test:
runs-on: ubuntu-22.04
name: test ${{ matrix.test.name }}
needs:
- setup
strategy:
matrix:
test: ${{ fromJson(needs.setup.outputs.otherTests) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "19"
- run: npm install
working-directory: ./launcher
- run: npm run test ${{ matrix.test.name }}
working-directory: ./launcher
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
IS_DEV: "true"