-
Notifications
You must be signed in to change notification settings - Fork 59
67 lines (55 loc) · 1.9 KB
/
hdfconverter-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
name: Run OHDF-Converters Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-22.04
services:
splunk:
image: splunk/splunk
volumes:
- /$(pwd)/test/configs/splunk/server.conf:/etc/system/local/server.conf
ports:
- 8089:8089
- 8088:8088
env:
SPLUNK_START_ARGS: --accept-license
SPLUNKD_SSL_ENABLE: false
SPLUNK_PASSWORD: Valid_password!
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
check-latest: true
cache: 'yarn'
- name: Remove frontend and backend code to ensure the proper dependencies are declared in the hdf-converters package.json
run: |
rm -rf apps/frontend
rm -rf apps/backend
- name: Install project dependencies
run: |
yarn hdf-converters install --frozen-lockfile
yarn workspace @heimdall/cypress-tests install
env:
CYPRESS_INSTALL_BINARY: 0
- name: Start Mock Sonarqube Server
run: yarn run cypress-test mock-json &
- name: Run unit tests
run: yarn hdf-converters test
env:
SPLUNK_HEC_TOKEN: ${{ secrets.SPLUNK_HEC_TOKEN }}
- name: Check RHEL7 XCCDF Results has a valid schema
uses: mitre/xccdf-validate-action@v1
with:
input: libs/hdf-converters/sample_jsons/xccdf_reverse_mapper/output_report/rhel7-xccdf-results.xml
- name: Check Example 3 Layer XCCDF Results has a valid schema
uses: mitre/xccdf-validate-action@v1
with:
input: libs/hdf-converters/sample_jsons/xccdf_reverse_mapper/output_report/example-3-layer-overlay-xccdf-results.xml
- name: Ensure the hdf-converters builds cleanly
run: yarn hdf-converters build