mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 01:08:46 +00:00
a190d3876a
This allows us to set it automatically in the workflow generator, simplifying things and reducing the scope for error.
55 lines
1.5 KiB
YAML
55 lines
1.5 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
|
|
env:
|
|
CODEQL_ACTION_TEST_MODE: "true"
|
|
- uses: ./../action/analyze
|
|
with:
|
|
output: ${{ runner.temp }}/results
|
|
upload-database: false
|
|
upload: false
|
|
env:
|
|
CODEQL_ACTION_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"
|