1
- name : ⚙️ DEMO CodeQL - Run Unit Tests (cpp)
1
+ name : ⚙️ CodeQL - Run Unit Tests (cpp)
2
2
3
3
4
4
on :
20
20
- name : Checkout repository
21
21
uses : actions/checkout@v3
22
22
23
+
23
24
- name : Install QLT
24
25
id : install-qlt
25
26
uses : ./.github/actions/install-qlt-local
32
33
run : |
33
34
qlt test run get-matrix --os-version ubuntu-latest --base example/
34
35
36
+
35
37
run-test-suites :
36
38
name : Run Unit Tests
37
39
needs : create-unit-test-matrix
@@ -45,13 +47,15 @@ jobs:
45
47
- name : Checkout repository
46
48
uses : actions/checkout@v3
47
49
50
+
48
51
- name : Install QLT
49
52
id : install-qlt
50
53
uses : ./.github/actions/install-qlt-local
51
54
with :
52
55
qlt-version : ' latest'
53
56
add-to-path : true
54
-
57
+
58
+
55
59
- name : Install CodeQL
56
60
id : install-codeql
57
61
uses : ./.github/actions/install-codeql
@@ -71,11 +75,13 @@ jobs:
71
75
echo "QLT Home: ${{ steps.install-qlt.outputs.qlt-home }}"
72
76
qlt version
73
77
78
+
74
79
- name : Install QL Packs
75
80
shell : bash
76
81
run : |
77
82
qlt query run install-packs --base example/
78
83
84
+
79
85
- name : Run test suites
80
86
id : run-test-suites
81
87
env :
@@ -86,11 +92,14 @@ jobs:
86
92
RUNNER_TMP : ${{ runner.temp }}
87
93
shell : bash
88
94
run : >
89
- qlt test run execute-unit-tests
95
+
96
+
97
+ qlt test run execute-unit-tests
98
+ --codeql-args "--threads=0"
90
99
--num-threads 4
91
100
--language cpp
92
101
--runner-os $RUNNER_OS
93
- --work-dir $RUNNER_TMP
102
+ --work-dir $RUNNER_TMP
94
103
--base example/
95
104
96
105
@@ -107,20 +116,24 @@ jobs:
107
116
needs : [run-test-suites]
108
117
runs-on : ubuntu-latest
109
118
steps :
119
+
110
120
- name : Checkout repository
111
121
uses : actions/checkout@v3
112
122
123
+
113
124
- name : Install QLT
114
125
id : install-qlt
115
126
uses : ./.github/actions/install-qlt-local
116
127
with :
117
128
qlt-version : ' latest'
118
129
add-to-path : true
119
130
131
+
120
132
- name : Collect test results
121
133
uses : actions/download-artifact@v2
122
134
123
135
- name : Validate test results
124
136
run : |
125
137
qlt test run validate-unit-tests --pretty-print --results-directory . >> $GITHUB_STEP_SUMMARY
126
- qlt test run validate-unit-tests --results-directory .
138
+ qlt test run validate-unit-tests --results-directory .
139
+
0 commit comments