1
1
name : ⚙️ CodeQL - Run Unit Tests (cpp)
2
2
3
-
4
3
on :
5
4
push :
6
5
branches :
7
- - ' main'
6
+ - " main"
8
7
pull_request :
9
8
branches :
10
- - ' main'
9
+ - " main"
11
10
workflow_dispatch :
12
11
13
-
14
12
jobs :
15
13
create-unit-test-matrix :
16
14
name : Create CodeQL Unit Test Matrix
@@ -21,20 +19,18 @@ jobs:
21
19
- name : Checkout repository
22
20
uses : actions/checkout@v3
23
21
24
-
25
22
- name : Install QLT
26
23
id : install-qlt
27
24
uses : ./.github/actions/install-qlt-local
28
25
with :
29
- qlt-version : ' latest'
26
+ qlt-version : " latest"
30
27
add-to-path : true
31
28
32
29
- name : Export unit test matrix
33
30
id : export-unit-test-matrix
34
31
run : |
35
32
qlt test run get-matrix --os-version ubuntu-latest --base example/
36
33
37
-
38
34
run-test-suites :
39
35
name : Run Unit Tests
40
36
needs : create-unit-test-matrix
@@ -48,15 +44,13 @@ jobs:
48
44
- name : Checkout repository
49
45
uses : actions/checkout@v3
50
46
51
-
52
47
- name : Install QLT
53
48
id : install-qlt
54
49
uses : ./.github/actions/install-qlt-local
55
50
with :
56
- qlt-version : ' latest'
51
+ qlt-version : " latest"
57
52
add-to-path : true
58
53
59
-
60
54
- name : Install CodeQL
61
55
id : install-codeql
62
56
shell : bash
@@ -77,13 +71,11 @@ jobs:
77
71
echo "QLT Home: ${{ steps.install-qlt.outputs.qlt-home }}"
78
72
qlt version
79
73
80
-
81
74
- name : Install QL Packs
82
75
shell : bash
83
76
run : |
84
77
qlt query run install-packs --base example/
85
78
86
-
87
79
- name : Run test suites
88
80
id : run-test-suites
89
81
env :
104
96
--work-dir $RUNNER_TMP
105
97
--base example/
106
98
107
-
108
99
- name : Upload test results
109
100
uses : actions/upload-artifact@v4
110
101
with :
@@ -118,24 +109,20 @@ jobs:
118
109
needs : [run-test-suites]
119
110
runs-on : ubuntu-latest
120
111
steps :
121
-
122
112
- name : Checkout repository
123
113
uses : actions/checkout@v3
124
114
125
-
126
115
- name : Install QLT
127
116
id : install-qlt
128
117
uses : ./.github/actions/install-qlt-local
129
118
with :
130
- qlt-version : ' latest'
119
+ qlt-version : " latest"
131
120
add-to-path : true
132
121
133
-
134
122
- name : Collect test results
135
- uses : actions/download-artifact@v2
123
+ uses : actions/download-artifact@v4
136
124
137
125
- name : Validate test results
138
126
run : |
139
127
qlt test run validate-unit-tests --pretty-print --results-directory . >> $GITHUB_STEP_SUMMARY
140
- qlt test run validate-unit-tests --results-directory .
141
-
128
+ qlt test run validate-unit-tests --results-directory .
0 commit comments