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 scanFinished = process . env . CODEQL_ACTION_ARTIFACT_SCAN_FINISHED ;
5+
6+ if ( scanFinished !== "true" ) {
7+ console . error ( "Error: Best-effort artifact scan did not complete. Expected CODEQL_ACTION_ARTIFACT_SCAN_FINISHED=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 5858 uses : actions/setup-dotnet@v5
5959 with :
6060 dotnet-version : ' 9.x'
61+ - name : Assert best-effort artifact scan completed
62+ uses : ./../action/.github/actions/verify-debug-artifact-scan-completed
6163 - uses : ./../action/init
6264 with :
6365 tools : ${{ steps.prepare-test.outputs.tools-url }}
7375 CODEQL_ACTION_EXTRA_OPTIONS : ' { "database": { "finalize": ["--invalid-option"] } }'
7476 with :
7577 expect-error : true
76- - name : Verify artifact scan ran
77- shell : bash
78- run : |
79- if [[ "$CODEQL_ACTION_ARTIFACT_SCAN_FINISHED" != "true" ]]; then
80- echo "Error: Best effort artifact scan did not run"
81- exit 1
82- fi
83- echo "✓ Best effort artifact scan completed successfully"
8478 download-and-check-artifacts :
8579 name : Download and check debug artifacts after failure in analyze
8680 if : github.triggering_actor != 'dependabot[bot]'
Original file line number Diff line number Diff line change 5454 uses : actions/setup-dotnet@v5
5555 with :
5656 dotnet-version : ' 9.x'
57+ - name : Assert best-effort artifact scan completed
58+ uses : ./../action/.github/actions/verify-debug-artifact-scan-completed
5759 - uses : ./../action/init
5860 id : init
5961 with :
6769 run : ./build.sh
6870 - uses : ./../action/analyze
6971 id : analysis
70- - name : Verify artifact scan ran
71- shell : bash
72- run : |
73- if [[ "$CODEQL_ACTION_ARTIFACT_SCAN_FINISHED" != "true" ]]; then
74- echo "Error: Best effort artifact scan did not run"
75- exit 1
76- fi
77- echo "✓ Best effort artifact scan completed successfully"
7872 download-and-check-artifacts :
7973 name : Download and check debug artifacts
8074 if : github.triggering_actor != 'dependabot[bot]'
You can’t perform that action at this time.
0 commit comments