@@ -2,34 +2,37 @@ name: CodeQL Unit Testing
22
33on :
44 merge_group :
5+ types : [checks_requested]
56 push :
67 branches :
78 - main
8- - " rc/**"
99 - next
10+ - " rc/**"
1011 pull_request :
1112 branches :
12- - " **"
13- workflow_dispatch :
13+ - main
14+ - next
15+ - " rc/**"
1416
1517jobs :
18+
1619 prepare-unit-test-matrix :
1720 name : Prepare CodeQL unit test matrix
1821 runs-on : ubuntu-22.04
1922 outputs :
2023 matrix : ${{ steps.export-unit-test-matrix.outputs.matrix }}
2124 steps :
2225 - name : Checkout repository
23- uses : actions/checkout@v2
26+ uses : actions/checkout@v4
2427
2528 - name : Export unit test matrix
2629 id : export-unit-test-matrix
2730 run : |
2831 echo "Merging Result:"
2932 python scripts/create_language_matrix.py
30- echo "::set-output name= matrix:: $(
33+ echo "matrix= $(
3134 python scripts/create_language_matrix.py | \
32- jq --compact-output 'map([.+{os: "ubuntu-20.04 -xl", codeql_standard_library_ident : .codeql_standard_library | sub("\/"; "_")}]) | flatten | {include: .}')"
35+ jq --compact-output 'map([.+{os: "ubuntu-latest -xl", codeql_standard_library_ident : .codeql_standard_library | sub("\/"; "_")}]) | flatten | {include: .}')" >> $GITHUB_OUTPUT
3336
3437 run-test-suites :
3538 name : Run unit tests
@@ -39,22 +42,22 @@ jobs:
3942 strategy :
4043 fail-fast : false
4144 matrix : ${{ fromJSON(needs.prepare-unit-test-matrix.outputs.matrix) }}
42-
45+
4346 steps :
4447 - name : Checkout repository
45- uses : actions/checkout@v2
48+ uses : actions/checkout@v4
4649
4750 - name : Install Python
4851 uses : actions/setup-python@v4
4952 with :
5053 python-version : " 3.9"
51-
54+
5255 - name : Install Python dependencies
5356 run : pip install -r scripts/requirements.txt
5457
5558 - name : Cache CodeQL
5659 id : cache-codeql
57- uses : actions/cache@v2.1.3
60+ uses : actions/cache@v3
5861 with :
5962 # A list of files, directories, and wildcard patterns to cache and restore
6063 path : ${{github.workspace}}/codeql_home
@@ -101,7 +104,7 @@ jobs:
101104
102105 def print_error(fmt, *args):
103106 print(f"::error::{fmt}", *args)
104-
107+
105108 def print_error_and_fail(fmt, *args):
106109 print_error(fmt, args)
107110 sys.exit(1)
@@ -148,7 +151,7 @@ jobs:
148151 file.close()
149152
150153 - name : Upload test results
151- uses : actions/upload-artifact@v2
154+ uses : actions/upload-artifact@v3
152155 with :
153156 name : ${{ matrix.language }}-test-results-${{ runner.os }}-${{ matrix.codeql_cli }}-${{ matrix.codeql_standard_library_ident }}
154157 path : |
@@ -157,11 +160,11 @@ jobs:
157160
158161 validate-test-results :
159162 name : Validate test results
160- needs : [ run-test-suites]
163+ needs : run-test-suites
161164 runs-on : ubuntu-22.04
162165 steps :
163166 - name : Collect test results
164- uses : actions/download-artifact@v2
167+ uses : actions/download-artifact@v3
165168
166169 - name : Validate test results
167170 run : |
0 commit comments