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 23
23
steps :
24
24
- uses : actions/checkout@v2
25
25
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
42
29
43
30
- name : Checkout ${{ matrix.repo }}
44
31
uses : actions/checkout@v2
Original file line number Diff line number Diff line change 21
21
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) |
22
22
sort -u | xargs -d '\n' -n1 printf "'%s' "
23
23
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
+
31
26
- name : QHelp preview
32
27
if : ${{ steps.changes.outputs.qhelp_files }}
33
28
run : |
Original file line number Diff line number Diff line change @@ -14,32 +14,22 @@ jobs:
14
14
runs-on : ubuntu-latest
15
15
steps :
16
16
- 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
33
19
- name : Run QL tests
34
20
run : |
35
21
codeql/codeql pack install ql/test
36
22
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 }}
37
25
- name : Check QL formatting
38
26
run : find ql "(" -name "*.ql" -or -name "*.qll" ")" -print0 | xargs -0 codeql/codeql query format --check-only
39
27
- name : Check QL compilation
40
28
run : |
41
29
codeql/codeql pack install ql/src
42
30
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 }}
43
33
- name : Check DB upgrade scripts
44
34
run : |
45
35
echo >empty.trap
You can’t perform that action at this time.
0 commit comments