File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
content/docs/static-analysis/codeql Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -566,27 +566,21 @@ For more information about testing CodeQL queries, see the
566566
567567# ## GitHub Actions
568568
569- The following workflow can be used to test custom CodeQL queries in GitHub Actions :
569+ The [`trailofbits/setup-codeql`](https://github.com/trailofbits/setup-codeql) workflow can be used to test custom CodeQL queries in GitHub Actions :
570570
571571` ` ` yml
572572name: Test CodeQL queries
573573
574574on: [push, pull_request]
575575
576576jobs:
577- codeql- test:
577+ test:
578578 runs-on: ubuntu-latest
579579 steps:
580- - uses: actions/checkout@v4
581- - id: init
582- uses: github/codeql-action/init@v3
583- - uses: actions/cache@v4
584- with:
585- path: ~/.codeql
586- key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.init.outputs.codeql-version }}
587- - name: Run tests
588- run: |
589- ${{ steps.init.outputs.codeql-path }} test run ./path/to/query/tests/
580+ - uses: actions/checkout@v6
581+ - uses: trailofbits/setup-codeql@main
582+ - run: codeql test run --threads=0 /path/to/query-tests
583+ - run: codeql query format --check-only /path/to/query.ql
590584` ` `
591585
592586This workflow also speeds up subsequent runs by caching query extraction and
You can’t perform that action at this time.
0 commit comments