-
Notifications
You must be signed in to change notification settings - Fork 10
161 lines (154 loc) · 5.01 KB
/
testing.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
name: Testrun test suite
permissions: {}
on:
pull_request:
schedule:
- cron: '0 13 * * *'
jobs:
testrun_baseline:
permissions: {}
name: Baseline
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: Checkout source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install dependencies
shell: bash {0}
run: cmd/prepare
- name: Install Testrun
shell: bash {0}
timeout-minutes: 10
run: TESTRUN_DIR=. cmd/install
- name: Run baseline tests
shell: bash {0}
run: testing/baseline/test_baseline
testrun_api:
permissions: {}
name: API
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install dependencies
shell: bash {0}
run: cmd/prepare
- name: Install Testrun
shell: bash {0}
run: cmd/install -l
timeout-minutes: 30
- name: Run tests
shell: bash {0}
run: testing/api/test_api
- name: Archive runtime results
if: ${{ always() }}
run: sudo tar --exclude-vcs -czf runtime.tgz runtime/ local/
- name: Upload runtime results
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
if: ${{ always() }}
with:
if-no-files-found: error
name: runtime_api_${{ github.run_id }}
path: runtime.tgz
testrun_unit:
permissions: {}
name: Unit
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Checkout source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install dependencies
shell: bash {0}
run: cmd/prepare
- name: Install Testrun
shell: bash {0}
run: cmd/install -l
- name: Build Testrun
shell: bash {0}
run: cmd/build
timeout-minutes: 10
- name: Run tests for conn module
shell: bash {0}
run: bash testing/unit/run_test_module.sh conn captures ethtool output
- name: Run tests for dns module
shell: bash {0}
run: bash testing/unit/run_test_module.sh dns captures reports output
- name: Run tests for ntp module
shell: bash {0}
run: bash testing/unit/run_test_module.sh ntp captures reports output
- name: Run tests for protocol module
shell: bash {0}
run: bash testing/unit/run_test_module.sh protocol captures output
- name: Run tests for services module
shell: bash {0}
run: bash testing/unit/run_test_module.sh services reports results output
- name: Run tests for tls module
shell: bash {0}
run: bash testing/unit/run_test_module.sh tls captures certAuth certs reports root_certs output
- name: Run tests for risk profiles
shell: bash {0}
run: bash testing/unit/run_report_test.sh testing/unit/risk_profile/risk_profile_test.py
- name: Run tests for reports
shell: bash {0}
run: bash testing/unit/run_report_test.sh testing/unit/report/report_test.py
- name: Upload reports
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
if: ${{ always() }}
with:
if-no-files-found: error
name: reports_${{ github.run_id }}
path: testing/unit/report/output
pylint:
permissions: {}
name: Pylint
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Checkout source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run pylint
shell: bash {0}
run: testing/pylint/test_pylint
testrun_ui:
permissions: {}
name: UI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 18.19.0
- name: Install Chromium Browser
run: sudo apt install chromium-browser
- name: Install dependencies
run: npm install && npm ci
working-directory: ./modules/ui
- name: Run tests
run: |
export CHROME_BIN=/usr/bin/chromium-browser
CI=true npm run test-ci
env:
CI: true
working-directory: ./modules/ui
linters_ui:
permissions: {}
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 18.19.0
- name: Install dependencies
run: npm install && npm ci
working-directory: ./modules/ui
- name: Run ESLint
run: npm run lint
working-directory: ./modules/ui
- name: Run format check
run: npm run format
working-directory: ./modules/ui