Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/internal-validate-cli-outputs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: ⚙️ Internal - Validate CLI Outputs

on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
workflow_dispatch:

env:
# Global configuration
DOTNET_VERSION: '6.0.x'
BUILD_CONFIGURATION: Debug

jobs:
validate-cli-outputs:
name: "Generate, validate, and test `new-query` CLI - (${{ matrix.language }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [cpp, csharp, go, java, javascript, python, ruby]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore dependencies
run: dotnet restore

- name: Build project
run: dotnet build -c ${{ env.BUILD_CONFIGURATION }} --no-restore

- name: Set test directory
run: echo "TEST_DIR=${{ runner.temp }}/qlt-cli-e2e-test" >> $GITHUB_ENV

- name: Prepare test environment
run: |
# Create test directory
mkdir -p "$TEST_DIR"

# Copy configuration file
cp example/qlt.conf.json "$TEST_DIR"

## Using the 'latest' version of the `codeql` CLI may eventually
## cause issues, where the `qlt.conf.json` file specifies an exact
## version of the CLI. For now, we live with the risk, and the issues
## surfaced might actually be useful to identify emerging problems
## in the `codeql` CLI -- which is only required here for extra
## debugging of any queries with test failures.
- name: Install `codeql` CLI
id: install-codeql
uses: ./.github/actions/install-codeql
with:
add-to-path: 'true'
codeql-cli-version: 'latest'
codeql-stdlib-version: 'latest'

- name: "Run end-to-end CLI validation for '${{ matrix.language }}' language"
run: ./scripts/validate-cli-e2e.sh --languages ${{ matrix.language }}

- name: "Upload test artifacts on failure for '${{ matrix.language }}' language"
if: failure()
uses: actions/upload-artifact@v4
with:
name: cli-validation-artifacts-${{ matrix.language }}
path: |
${{ runner.temp }}/qlt-cli-e2e-test/${{ matrix.language }}/**
!${{ runner.temp }}/qlt-cli-e2e-test/${{ matrix.language }}/**/*.testproj
if-no-files-found: warn
retention-days: 2
7 changes: 7 additions & 0 deletions CodeQLToolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeQLToolkit.Features", "s
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeQLToolkit.Shared.Tests", "test\CodeQLToolkit.Shared.Tests\CodeQLToolkit.Shared.Tests.csproj", "{E57121C2-2A2E-487C-9C32-A7D8914E9123}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeQLToolkit.Features.Tests", "test\CodeQLToolkit.Features.Tests\CodeQLToolkit.Features.Tests.csproj", "{F1234567-89AB-CDEF-0123-456789ABCDEF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -55,6 +57,10 @@ Global
{E57121C2-2A2E-487C-9C32-A7D8914E9123}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E57121C2-2A2E-487C-9C32-A7D8914E9123}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E57121C2-2A2E-487C-9C32-A7D8914E9123}.Release|Any CPU.Build.0 = Release|Any CPU
{F1234567-89AB-CDEF-0123-456789ABCDEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F1234567-89AB-CDEF-0123-456789ABCDEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F1234567-89AB-CDEF-0123-456789ABCDEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F1234567-89AB-CDEF-0123-456789ABCDEF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -65,6 +71,7 @@ Global
{A1F78CBC-9AE9-4360-A06B-395F368B183A} = {05645E0E-835A-4627-BDAE-C27EC39B23EE}
{B85F1529-3321-4AD2-924A-6EA478145DC5} = {667B480C-D805-4A9C-AC1F-D9FCCF3DB57C}
{E57121C2-2A2E-487C-9C32-A7D8914E9123} = {05645E0E-835A-4627-BDAE-C27EC39B23EE}
{F1234567-89AB-CDEF-0123-456789ABCDEF} = {05645E0E-835A-4627-BDAE-C27EC39B23EE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BF8F3B81-F4DC-4608-A41C-F00F3E5A05CA}
Expand Down
22 changes: 15 additions & 7 deletions example/cpp/customizations/src/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.12.2
version: 5.4.1
codeql/dataflow:
version: 0.1.5
version: 2.0.13
codeql/mad:
version: 1.0.29
codeql/quantum:
version: 0.0.7
codeql/rangeanalysis:
version: 0.0.4
version: 1.0.29
codeql/ssa:
version: 0.2.5
version: 2.0.5
codeql/tutorial:
version: 0.2.5
version: 1.0.29
codeql/typeflow:
version: 1.0.29
codeql/typetracking:
version: 0.2.5
version: 2.0.13
codeql/util:
version: 0.2.5
version: 2.0.16
codeql/xml:
version: 1.0.29
compiled: false
4 changes: 2 additions & 2 deletions example/cpp/customizations/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
library: true
name: qlt/cpp-customizations
version: 0.0.1
version: 0.0.2
dependencies:
"codeql/cpp-all": "0.12.2"
"codeql/cpp-all": "5.4.1"
22 changes: 15 additions & 7 deletions example/cpp/customizations/test/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.12.2
version: 5.4.1
codeql/dataflow:
version: 0.1.5
version: 2.0.13
codeql/mad:
version: 1.0.29
codeql/quantum:
version: 0.0.7
codeql/rangeanalysis:
version: 0.0.4
version: 1.0.29
codeql/ssa:
version: 0.2.5
version: 2.0.5
codeql/tutorial:
version: 0.2.5
version: 1.0.29
codeql/typeflow:
version: 1.0.29
codeql/typetracking:
version: 0.2.5
version: 2.0.13
codeql/util:
version: 0.2.5
version: 2.0.16
codeql/xml:
version: 1.0.29
compiled: false
2 changes: 1 addition & 1 deletion example/cpp/customizations/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
library: true
name: qlt/cpp-customizations-tests
version: 0.0.1
version: 0.0.2
dependencies:
"qlt/cpp-customizations": "*"
extractor: cpp
22 changes: 15 additions & 7 deletions example/cpp/stuff/src/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.12.2
version: 5.4.1
codeql/dataflow:
version: 0.1.5
version: 2.0.13
codeql/mad:
version: 1.0.29
codeql/quantum:
version: 0.0.7
codeql/rangeanalysis:
version: 0.0.4
version: 1.0.29
codeql/ssa:
version: 0.2.5
version: 2.0.5
codeql/tutorial:
version: 0.2.5
version: 1.0.29
codeql/typeflow:
version: 1.0.29
codeql/typetracking:
version: 0.2.5
version: 2.0.13
codeql/util:
version: 0.2.5
version: 2.0.16
codeql/xml:
version: 1.0.29
compiled: false
4 changes: 2 additions & 2 deletions example/cpp/stuff/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
library: true
name: qlt55/stuff
version: 0.0.1
version: 0.0.2
description: Default description
suites:
license:
dependencies:
codeql/cpp-all: "0.12.2"
codeql/cpp-all: "5.4.1"
22 changes: 15 additions & 7 deletions example/cpp/stuff/test/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.12.2
version: 5.4.1
codeql/dataflow:
version: 0.1.5
version: 2.0.13
codeql/mad:
version: 1.0.29
codeql/quantum:
version: 0.0.7
codeql/rangeanalysis:
version: 0.0.4
version: 1.0.29
codeql/ssa:
version: 0.2.5
version: 2.0.5
codeql/tutorial:
version: 0.2.5
version: 1.0.29
codeql/typeflow:
version: 1.0.29
codeql/typetracking:
version: 0.2.5
version: 2.0.13
codeql/util:
version: 0.2.5
version: 2.0.16
codeql/xml:
version: 1.0.29
compiled: false
2 changes: 1 addition & 1 deletion example/cpp/stuff/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: qlt55/stuff-tests
version: 0.0.0
version: 0.0.2
description: Default description
suites:
license:
Expand Down
22 changes: 15 additions & 7 deletions example/cpp/stuff2/src/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.12.2
version: 5.4.1
codeql/dataflow:
version: 0.1.5
version: 2.0.13
codeql/mad:
version: 1.0.29
codeql/quantum:
version: 0.0.7
codeql/rangeanalysis:
version: 0.0.4
version: 1.0.29
codeql/ssa:
version: 0.2.5
version: 2.0.5
codeql/tutorial:
version: 0.2.5
version: 1.0.29
codeql/typeflow:
version: 1.0.29
codeql/typetracking:
version: 0.2.5
version: 2.0.13
codeql/util:
version: 0.2.5
version: 2.0.16
codeql/xml:
version: 1.0.29
compiled: false
4 changes: 2 additions & 2 deletions example/cpp/stuff2/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
library: true
name: qlt2/stuff2
version: 0.0.1
version: 0.0.2
description: Default description
suites:
license:
dependencies:
codeql/cpp-all: "0.12.2"
codeql/cpp-all: "5.4.1"
22 changes: 15 additions & 7 deletions example/cpp/stuff2/test/codeql-pack.lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@
lockVersion: 1.0.0
dependencies:
codeql/cpp-all:
version: 0.12.2
version: 5.4.1
codeql/dataflow:
version: 0.1.5
version: 2.0.13
codeql/mad:
version: 1.0.29
codeql/quantum:
version: 0.0.7
codeql/rangeanalysis:
version: 0.0.4
version: 1.0.29
codeql/ssa:
version: 0.2.5
version: 2.0.5
codeql/tutorial:
version: 0.2.5
version: 1.0.29
codeql/typeflow:
version: 1.0.29
codeql/typetracking:
version: 0.2.5
version: 2.0.13
codeql/util:
version: 0.2.5
version: 2.0.16
codeql/xml:
version: 1.0.29
compiled: false
2 changes: 1 addition & 1 deletion example/cpp/stuff2/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: qlt2/stuff2-tests
version: 0.0.0
version: 0.0.2
description: Default description
suites:
license:
Expand Down
8 changes: 4 additions & 4 deletions example/qlt.conf.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"CodeQLCLI": "2.15.5",
"CodeQLStandardLibrary": "codeql-cli/v2.15.5",
"CodeQLCLIBundle": "codeql-bundle-v2.15.5",
"CodeQLCLI": "2.22.4",
"CodeQLStandardLibrary": "codeql-cli/v2.22.4",
"CodeQLCLIBundle": "codeql-bundle-v2.22.4",
"EnableCustomCodeQLBundles": true,
"CodeQLStandardLibraryIdent": "codeql-cli_v2.15.5",
"CodeQLStandardLibraryIdent": "codeql-cli_v2.22.4",
"CodeQLPackConfiguration" : [
{
"Name": "qlt/cpp-customizations",
Expand Down
Loading
Loading