File tree Expand file tree Collapse file tree 5 files changed +39
-39
lines changed
Expand file tree Collapse file tree 5 files changed +39
-39
lines changed Original file line number Diff line number Diff line change 1+ name : Build Ruby CodeQL pack
2+ description : Builds the Ruby CodeQL pack
3+ runs :
4+ using : composite
5+ steps :
6+ - uses : actions/cache@v2
7+ with :
8+ path : |
9+ ~/.cargo/registry
10+ ~/.cargo/git
11+ target
12+ key : ${{ runner.os }}-qltest-cargo-${{ hashFiles('**/Cargo.lock') }}
13+ - name : Build Extractor
14+ shell : bash
15+ run : env "PATH=$PATH:${{ github.workspace }}/codeql" scripts/create-extractor-pack.sh
Original file line number Diff line number Diff line change 1+ name : Fetch CodeQL
2+ description : Fetches the latest version of CodeQL
3+ runs :
4+ using : composite
5+ steps :
6+ - name : Fetch CodeQL
7+ shell : bash
8+ run : |
9+ LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
10+ gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
11+ unzip -q codeql-linux64.zip
12+ env :
13+ GITHUB_TOKEN : ${{ github.token }}
Original file line number Diff line number Diff line change 2323 steps :
2424 - uses : actions/checkout@v2
2525
26- - name : Fetch CodeQL
27- run : |
28- LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
29- gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
30- unzip -q codeql-linux64.zip
31- env :
32- GITHUB_TOKEN : ${{ github.token }}
33- - uses : actions/cache@v2
34- with :
35- path : |
36- ~/.cargo/registry
37- ~/.cargo/git
38- target
39- key : ${{ runner.os }}-qltest-cargo-${{ hashFiles('**/Cargo.lock') }}
40- - name : Build Extractor
41- run : env "PATH=$PATH:${{ github.workspace }}/codeql" scripts/create-extractor-pack.sh
26+ - uses : ./.github/actions/fetch-codeql
27+
28+ - uses : ./.github/actions/create-extractor-pack
4229
4330 - name : Checkout ${{ matrix.repo }}
4431 uses : actions/checkout@v2
Original file line number Diff line number Diff line change 2121 git diff --name-only --diff-filter=ACMRT HEAD~1 HEAD | grep .inc.qhelp$ | xargs -d '\n' -rn1 basename | xargs -d '\n' -rn1 git grep -l) |
2222 sort -u | xargs -d '\n' -n1 printf "'%s' "
2323
24- - name : Fetch CodeQL
25- run : |
26- LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
27- gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
28- unzip -q codeql-linux64.zip
29- env :
30- GITHUB_TOKEN : ${{ github.token }}
24+ - uses : ./.github/actions/fetch-codeql
25+
3126 - name : QHelp preview
3227 if : ${{ steps.changes.outputs.qhelp_files }}
3328 run : |
Original file line number Diff line number Diff line change @@ -14,32 +14,22 @@ jobs:
1414 runs-on : ubuntu-latest
1515 steps :
1616 - uses : actions/checkout@v2
17- - name : Fetch CodeQL
18- run : |
19- LATEST=$(gh release list --repo https://github.com/github/codeql-cli-binaries | cut -f 1 | grep -v beta | sort --version-sort | tail -1)
20- gh release download --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip "$LATEST"
21- unzip -q codeql-linux64.zip
22- env :
23- GITHUB_TOKEN : ${{ github.token }}
24- - uses : actions/cache@v2
25- with :
26- path : |
27- ~/.cargo/registry
28- ~/.cargo/git
29- target
30- key : ${{ runner.os }}-qltest-cargo-${{ hashFiles('**/Cargo.lock') }}
31- - name : Build Extractor
32- run : env "PATH=$PATH:${{ github.workspace }}/codeql" scripts/create-extractor-pack.sh
17+ - uses : ./.github/actions/fetch-codeql
18+ - uses : ./.github/actions/create-extractor-pack
3319 - name : Run QL tests
3420 run : |
3521 codeql/codeql pack install ql/test
3622 codeql/codeql test run --check-databases --check-unused-labels --check-repeated-labels --check-redefined-labels --check-use-before-definition --search-path "${{ github.workspace }}" --additional-packs "${HOME}/.codeql/packages/codeql/suite-helpers/0.0.1" --consistency-queries ql/consistency-queries ql/test
23+ env :
24+ GITHUB_TOKEN : ${{ github.token }}
3725 - name : Check QL formatting
3826 run : find ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql/codeql query format --check-only
3927 - name : Check QL compilation
4028 run : |
4129 codeql/codeql pack install ql/src
4230 codeql/codeql query compile --check-only --threads=4 --warnings=error --search-path "${{ github.workspace }}" "ql/src" "ql/examples"
31+ env :
32+ GITHUB_TOKEN : ${{ github.token }}
4333 - name : Check DB upgrade scripts
4434 run : |
4535 echo >empty.trap
You can’t perform that action at this time.
0 commit comments