File tree Expand file tree Collapse file tree 5 files changed +23
-16
lines changed
actions/verify-debug-artifact-scan-completed Expand file tree Collapse file tree 5 files changed +23
-16
lines changed Original file line number Diff line number Diff line change 1+ name : Verify that the best-effort debug artifact scan completed
2+ description : Verifies that the best-effort debug artifact scan completed successfully during tests
3+ runs :
4+ using : node20
5+ main : index.js
6+ post : post.js
Original file line number Diff line number Diff line change 1+ // The main step is a no-op, since we can only verify artifact scan completion in the post step.
2+ console . log ( "Will verify artifact scan completion in the post step." ) ;
Original file line number Diff line number Diff line change 1+ // Post step - runs after the workflow completes, when artifact scan has finished
2+ const process = require ( "process" ) ;
3+
4+ const scanComplete = process . env . CODEQL_ACTION_ARTIFACT_SCAN_COMPLETE ;
5+
6+ if ( scanComplete !== "true" ) {
7+ console . error ( "Error: Best-effort artifact scan did not complete. Expected CODEQL_ACTION_ARTIFACT_SCAN_COMPLETE=true" ) ;
8+ process . exit ( 1 ) ;
9+ }
10+
11+ console . log ( "✓ Best-effort artifact scan completed successfully" ) ;
Original file line number Diff line number Diff line change 5555 uses : actions/setup-dotnet@v5
5656 with :
5757 dotnet-version : ' 9.x'
58+ - name : Assert best-effort artifact scan completed
59+ uses : ./../action/.github/actions/verify-debug-artifact-scan-completed
5860 - uses : ./../action/init
5961 with :
6062 tools : ${{ steps.prepare-test.outputs.tools-url }}
7072 CODEQL_ACTION_EXTRA_OPTIONS : ' { "database": { "finalize": ["--invalid-option"] } }'
7173 with :
7274 expect-error : true
73- - name : Verify artifact scan ran
74- shell : bash
75- run : |
76- if [[ "$CODEQL_ACTION_ARTIFACT_SCAN_FINISHED" != "true" ]]; then
77- echo "Error: Best effort artifact scan did not run"
78- exit 1
79- fi
80- echo "✓ Best effort artifact scan completed successfully"
8175 download-and-check-artifacts :
8276 name : Download and check debug artifacts after failure in analyze
8377 if : github.triggering_actor != 'dependabot[bot]'
Original file line number Diff line number Diff line change 5151 uses : actions/setup-dotnet@v5
5252 with :
5353 dotnet-version : ' 9.x'
54+ - name : Assert best-effort artifact scan completed
55+ uses : ./../action/.github/actions/verify-debug-artifact-scan-completed
5456 - uses : ./../action/init
5557 id : init
5658 with :
6466 run : ./build.sh
6567 - uses : ./../action/analyze
6668 id : analysis
67- - name : Verify artifact scan ran
68- shell : bash
69- run : |
70- if [[ "$CODEQL_ACTION_ARTIFACT_SCAN_FINISHED" != "true" ]]; then
71- echo "Error: Best effort artifact scan did not run"
72- exit 1
73- fi
74- echo "✓ Best effort artifact scan completed successfully"
7569 download-and-check-artifacts :
7670 name : Download and check debug artifacts
7771 if : github.triggering_actor != 'dependabot[bot]'
You can’t perform that action at this time.
0 commit comments