-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (71 loc) · 2.21 KB
/
DEMO-validate-codeql-queries-cpp.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
name: ⚙️ DEMO CodeQL - Validate Queries (cpp)
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
jobs:
create-matrix:
name: Create CodeQL Test Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.export-test-matrix.outputs.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install QLT
id: install-qlt
uses: ./.github/actions/install-qlt-local
with:
qlt-version: 'latest'
add-to-path: true
- name: Export test matrix
id: export-test-matrix
run: |
qlt test run get-matrix --os-version ubuntu-latest
validate-queries:
name: Validate Queries
needs: create-matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install QLT
uses: ./.github/actions/install-qlt-local
with:
qlt-version: 'latest'
add-to-path: true
- name: Install CodeQL
uses: ./.github/actions/install-codeql
with:
codeql-cli-version: ${{ matrix.codeql_cli }}
codeql-stdlib-version: ${{ matrix.codeql_standard_library }}
add-to-path: true
- name: Verify Versions of Tooling
shell: bash
run: |
echo "CodeQL Home: ${{ steps.install-codeql.outputs.codeql-home }}"
echo -e "Checking CodeQL Version:"
codeql --version
echo -e "Checking QLT Version:"
echo "QLT Home: ${{ steps.install-qlt.outputs.qlt-home }}"
qlt version
- name: Install QL Packs
shell: bash
run: |
qlt query run install-packs --base example/
- name: Run validation tests
shell: bash
run: >
# run a copy for pretty printing
qlt validation run check-queries --pretty-print
--language cpp --base example/
# run this version to influence the outcome of the run.
qlt validation run check-queries
--language cpp --base example/