From 56e5e47d629440d013ff192755a8fa16ebcefbce Mon Sep 17 00:00:00 2001 From: Matt Schwager Date: Tue, 2 Jul 2024 12:22:42 -0400 Subject: [PATCH 1/3] Add CI job for running query tests --- .github/workflows/test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1e668b4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: CodeQL queries test +on: + pull_request: + push: + branches: + - main +jobs: + test: + name: Run CodeQL query tests + runs-on: ubuntu-latest + steps: + - id: init + uses: github/codeql-action/init@v3 + - name: Run tests + run: | + ${{ steps.init.outputs.codeql-path }} test run ./cpp/test/ + ${{ steps.init.outputs.codeql-path }} test run ./go/test/ From 3d67b3cc6b4bd878076e247e47dff34ff5d3c5b7 Mon Sep 17 00:00:00 2001 From: Matt Schwager Date: Tue, 2 Jul 2024 12:25:57 -0400 Subject: [PATCH 2/3] Try parent directory --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1e668b4..4409231 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,5 +13,5 @@ jobs: uses: github/codeql-action/init@v3 - name: Run tests run: | - ${{ steps.init.outputs.codeql-path }} test run ./cpp/test/ - ${{ steps.init.outputs.codeql-path }} test run ./go/test/ + ${{ steps.init.outputs.codeql-path }} test run ../cpp/test/ + ${{ steps.init.outputs.codeql-path }} test run ../go/test/ From 5b85a44a7a074e721c8c9cb2b4551799871ad69e Mon Sep 17 00:00:00 2001 From: Matt Schwager Date: Tue, 2 Jul 2024 12:31:36 -0400 Subject: [PATCH 3/3] Checkout code first --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4409231..64f84ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,9 +9,10 @@ jobs: name: Run CodeQL query tests runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - id: init uses: github/codeql-action/init@v3 - name: Run tests run: | - ${{ steps.init.outputs.codeql-path }} test run ../cpp/test/ - ${{ steps.init.outputs.codeql-path }} test run ../go/test/ + ${{ steps.init.outputs.codeql-path }} test run ./cpp/test/ + ${{ steps.init.outputs.codeql-path }} test run ./go/test/