8000 CI Checks: Fix and improve stability (#10) · github/gh-codeql@41214ac · GitHub
[go: up one dir, main page]

Skip to content

Commit 41214ac

Browse files
CI Checks: Fix and improve stability (#10)
1 parent 4664d1b commit 41214ac

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/pr-checks.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,26 @@ jobs:
2424
run: |
2525
gh extensions install .
2626
27+
- name: Check automatically installs latest
28+
shell: bash
29+
run: |
30+
LATEST=`gh release list --repo github/codeql-cli-binaries -L 1 | cut -f 3`
31+
32+
# Note we need to run a command before trying to parse the output below, or the
33+
# messages from the download will end up in the JSON that jq tries to parse
34+
gh codeql version
35+
36+
INSTALLED=`gh codeql version --format json | jq -r '.version'`
37+
if [[ "v$INSTALLED" != $LATEST ]]; then
38+
echo "::error::Expected latest version of $LATEST to be installed, but found v$INSTALLED"
39+
exit 1
40+
fi
41+
2742
- name: Check basic functionality
2843
working-directory: test-resources
2944
shell: bash
3045
run: |
46+
gh codeql set-version 2.6.1
3147
gh codeql database create -l cpp -s test-repo -c "gcc -o main main.c" test-db
3248
gh codeql pack install test-pack
3349
gh codeql database analyze --format=sarif-latest --output=out.sarif test-db test-pack/allExpressions.ql

test-resources/test-pack/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: test-cpp-querypack
22
version: 0.0.1
33
dependencies:
4-
codeql/cpp-all: "*"
4+
codeql/cpp-all: "0.0.2"

0 commit comments

Comments
 (0)
0