adding new option for default codescanning config #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ⚙️ CodeQL - Validate Queries (cpp) | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
branches: | |
- 'main' | |
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 --base example/ | |
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 | |
id: install-qlt | |
uses: ./.github/actions/install-qlt-local | |
with: | |
qlt-version: 'latest' | |
add-to-path: true | |
- name: Install CodeQL | |
id: install-codeql | |
shell: bash | |
run: | | |
echo "Installing CodeQL" | |
qlt codeql run install --base example/ | |
echo "-----------------------------" | |
echo "CodeQL Home: $QLT_CODEQL_HOME" | |
echo "CodeQL Binary: $QLT_CODEQL_PATH" | |
- name: Verify Versions of Tooling | |
shell: bash | |
run: | | |
echo -e "Checking CodeQL Version:" | |
$QLT_CODEQL_PATH --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: > | |
qlt validation run check-queries --pretty-print --language cpp --base example/ >> $GITHUB_STEP_SUMMARY | |
qlt validation run check-queries --language cpp --base example/ |