This commit adds the packs and queries from the actions input to the config file used by the CodeQL CLI. When the `+` is used, the actions input value is combined with the config value and when it is not used, the input value overrides the config value. This commit also adds a bunch of integration tests for this feature. In order to avoid adding too many new jobs, all of the tests are run sequentially in a single job (matrixed across relevant operating systems and OSes).
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Query Filter Test
|
|
description: Runs a test of query filters using the check sarif action
|
|
inputs:
|
|
sarif-file:
|
|
required: true
|
|
description: The SARIF file to check
|
|
|
|
queries-run:
|
|
required: true
|
|
description: |
|
|
Comma separated list of query ids that should be included in this SARIF file.
|
|
|
|
queries-not-run:
|
|
required: true
|
|
description: |
|
|
Comma separated list of query ids that should NOT be included in this SARIF file.
|
|
|
|
config-file:
|
|
required: true
|
|
description: |
|
|
The location of the codeql configuration file to use.
|
|
|
|
tools:
|
|
required: true
|
|
description: |
|
|
The url of codeql to use.
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: ./../action/init
|
|
with:
|
|
languages: javascript
|
|
config-file: ${{ inputs.config-file }}
|
|
tools: ${{ inputs.tools }}
|
|
db-location: ${{ runner.temp }}/query-filter-test
|
|
- uses: ./../action/analyze
|
|
with:
|
|
output: ${{ runner.temp }}/results
|
|
upload-database: false
|
|
upload: false
|
|
env:
|
|
TEST_MODE: "true"
|
|
- name: Check SARIF
|
|
uses: ./../action/.github/check-sarif
|
|
with:
|
|
sarif-file: ${{ inputs.sarif-file }}
|
|
queries-run: ${{ inputs.queries-run}}
|
|
queries-not-run: ${{ inputs.queries-not-run}}
|
|
- name: Cleanup after test
|
|
shell: bash
|
|
run: rm -rf "$RUNNER_TEMP/results" "$RUNNER_TEMP/query-filter-test"
|