Skip to content

Commit ed476d1

Browse files
authored
Upgrade CodeQL caching and dependencies installation
Updated CodeQL workflow to use caching
1 parent aaac22d commit ed476d1

1 file changed

Lines changed: 7 additions & 10 deletions

File tree

.github/workflows/codeql_unit_tests.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717
- "rc/**"
1818

1919
jobs:
20-
2120
prepare-unit-test-matrix:
2221
name: Prepare CodeQL unit test matrix
2322
runs-on: ubuntu-22.04
@@ -58,16 +57,15 @@ jobs:
5857
run: pip install -r scripts/requirements.txt
5958

6059
- name: Cache CodeQL
61-
id: cache-codeql
62-
uses: actions/cache@v5
60+
uses: actions/cache@v6
6361
with:
64-
# A list of files, directories, and wildcard patterns to cache and restore
65-
path: ${{github.workspace}}/codeql_home
66-
# An explicit key for restoring and saving the cache
67-
key: codeql-home-${{matrix.os}}-${{matrix.codeql_cli}}-${{matrix.codeql_standard_library}}
62+
path: ~/.codeql
63+
key: ${{ runner.os }}-codeql-cache-${{ matrix.language }}-${{ matrix.codeql_cli }}-${{ github.run_id }}
64+
restore-keys: |
65+
${{ runner.os }}-codeql-cache-${{ matrix.language }}-${{ matrix.codeql_cli }}
66+
${{ runner.os }}-codeql-cache-${{ matrix.language }}
6867
6968
- name: Install CodeQL
70-
if: steps.cache-codeql.outputs.cache-hit != 'true'
7169
uses: ./.github/actions/install-codeql
7270
with:
7371
codeql-cli-version: ${{ matrix.codeql_cli }}
@@ -83,8 +81,7 @@ jobs:
8381
- name: Pre-Compile Queries
8482
id: pre-compile-queries
8583
run: |
86-
${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 ${{ matrix.language }}
87-
84+
${{ github.workspace }}/codeql_home/codeql/codeql query compile --threads 0 ${{ matrix.language }}
8885
8986
- name: Run test suites
9087
id: run-test-suites

0 commit comments

Comments
 (0)