-
-
Notifications
You must be signed in to change notification settings - Fork 55
121 lines (114 loc) · 3.77 KB
/
Copy pathtest-integration.yml
File metadata and controls
121 lines (114 loc) · 3.77 KB
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
name: Tests Integration
on:
push:
branches: [main]
workflow_dispatch:
jobs:
setup:
runs-on: ubuntu-latest
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@v5
- uses: actions/setup-node@v4
with:
node-version: 24
- 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-latest
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@v5
- uses: actions/setup-node@v4
with:
node-version: 24
- 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-latest
name: test ${{ matrix.test.name }}
needs:
- setup
- Other-Integration-test
strategy:
matrix:
test: ${{ fromJson(needs.setup.outputs.ELTests) }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 24
- 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-latest
name: test ${{ matrix.test.name }}
needs:
- setup
strategy:
matrix:
test: ${{ fromJson(needs.setup.outputs.otherTests) }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 24
- 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"
Cleanup:
runs-on: ubuntu-latest
name: Cleanup
needs:
- Validator-Import-test
- Execution-Client-test
- Other-Integration-test
if: ${{ always() }} # run even if dependencies failed or were cancelled
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm install
working-directory: ./launcher
- run: npm run test:cleanup
working-directory: ./launcher
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
IS_DEV: "true"