mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Go: add RTJO language tests CI job
Triggered by adding label "Run: RTJO Language Tests"
This commit is contained in:
22
.github/workflows/go-tests-rtjo.yml
vendored
Normal file
22
.github/workflows/go-tests-rtjo.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: "Go: Run RTJO Tests"
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-linux:
|
||||||
|
if: "github.repository_owner == 'github' && github.event.label.name == 'Run: RTJO Language Tests'"
|
||||||
|
name: RTJO Test Linux (Ubuntu)
|
||||||
|
runs-on: ubuntu-latest-xl
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./go/actions/test
|
||||||
|
with:
|
||||||
|
run-code-checks: true
|
||||||
|
dynamic-join-order-mode: all
|
||||||
@@ -52,9 +52,9 @@ ql/lib/go.dbscheme.stats: ql/lib/go.dbscheme build/stats/src.stamp extractor
|
|||||||
codeql dataset measure -o $@ build/stats/database/db-go
|
codeql dataset measure -o $@ build/stats/database/db-go
|
||||||
|
|
||||||
test: all build/testdb/check-upgrade-path
|
test: all build/testdb/check-upgrade-path
|
||||||
codeql test run -j0 ql/test --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache)
|
codeql test run -j0 ql/test --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache) --dynamic-join-order-mode=$(rtjo)
|
||||||
# use GOOS=linux because GOOS=darwin GOARCH=386 is no longer supported
|
# use GOOS=linux because GOOS=darwin GOARCH=386 is no longer supported
|
||||||
env GOOS=linux GOARCH=386 codeql$(EXE) test run -j0 ql/test/query-tests/Security/CWE-681 --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache)
|
env GOOS=linux GOARCH=386 codeql$(EXE) test run -j0 ql/test/query-tests/Security/CWE-681 --search-path .. --consistency-queries ql/test/consistency --compilation-cache=$(cache) --dynamic-join-order-mode=$(rtjo)
|
||||||
cd extractor; $(BAZEL) test ...
|
cd extractor; $(BAZEL) test ...
|
||||||
bash extractor-smoke-test/test.sh || (echo "Extractor smoke test FAILED"; exit 1)
|
bash extractor-smoke-test/test.sh || (echo "Extractor smoke test FAILED"; exit 1)
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ inputs:
|
|||||||
description: Whether to run formatting, code and qhelp generation checks
|
description: Whether to run formatting, code and qhelp generation checks
|
||||||
required: false
|
required: false
|
||||||
default: false
|
default: false
|
||||||
|
dynamic-join-order-mode:
|
||||||
|
description: Value of the --dynamic-join-order-mode flag to pass to the codeql test command
|
||||||
|
required: false
|
||||||
|
default: "none"
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@@ -74,4 +78,4 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd go
|
cd go
|
||||||
make test cache="${{ steps.query-cache.outputs.cache-dir }}"
|
make test cache="${{ steps.query-cache.outputs.cache-dir }}" rtjo=${{ inputs.dynamic-join-order-mode }}
|
||||||
|
|||||||
Reference in New Issue
Block a user