CI: make all jobs that fetch a CodeQL CLI use the fetch-codeql action#9938
Conversation
edoardopirovano
left a comment
There was a problem hiding this comment.
Seems reasonable to me, and it's nice we can now switch to a nightly version by just changing one word if we decide that's what we want to do.
adityasharad
left a comment
There was a problem hiding this comment.
Nice! Several locations where we previously used codeql-cli/codeql that I think can be cleaned up. Otherwise looks good.
| - name: Generate CSV files on merge commit of the PR | ||
| run: | | ||
| echo "Running generator on merge" | ||
| PATH="$PATH:codeql-cli/codeql" python merge/misc/scripts/library-coverage/generate-report.py ci merge merge |
There was a problem hiding this comment.
This path needs to change I think; or we drop it since codeql should already be on GITHUB_PATH.
There was a problem hiding this comment.
well spotted; codeql is already on the GITHUB_PATH. I'll clean this up in a follow-up PR. The go tests take ridiculously long on each commit so I'd rather get this merged and make a quick fix-up PR.
| - name: Generate CSV files on base commit of the PR | ||
| run: | | ||
| echo "Running generator on base" | ||
| PATH="$PATH:codeql-cli/codeql" python base/misc/scripts/library-coverage/generate-report.py ci base base |
| CLI=$(realpath "codeql-cli/codeql") | ||
| echo $CLI | ||
| PATH="$PATH:$CLI" python script/misc/scripts/library-coverage/generate-timeseries.py codeqlModels |
There was a problem hiding this comment.
As above, the CLI is not in codeql-cli.
| uses: ./.github/actions/fetch-codeql | ||
| - name: Generate coverage files | ||
| run: | | ||
| PATH="$PATH:codeql-cli/codeql" python ql/misc/scripts/library-coverage/generate-report.py ci ql ql |
| uses: ./.github/actions/fetch-codeql | ||
| - name: Build modeled package list | ||
| run: | | ||
| PATH="$PATH:codeql-cli/codeql" python script/misc/scripts/library-coverage/generate-report.py ci codeqlModels script |
Many of the CI jobs download a copy of the CodeQL CLI. However, they were using different ways of doing that:
fetch-codeqlactiongh codeqlThis PR refactors the workflows to all use the
fetch-codeqlAction. Thefetch-codeqlaction itself is re-implemented usinggh codeqlThe workflows affected by this change are: