Skip to content

Commit

Permalink
add callback to log the ERROR status for the error job (#14)
Browse files Browse the repository at this point in the history
* add callback to log the ERROR status for the error job

* remove expression syntax test
  • Loading branch information
gnarf authored Mar 28, 2024
1 parent e0c10ba commit cb2e325
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/nvda-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,23 @@ jobs:
- name: Run harness
shell: powershell
continue-on-error: true
env:
NVDA_PORTABLE_ZIP: ${{ fromJson(steps.nvda-portable-download.outputs.downloaded_files)[0] }}
run: |
& .\run-tester.ps1
- name: Log job state ERROR
shell: powershell
if: failure() && inputs.status_url
run: |
$headerbits = $env:ARIA_AT_CALLBACK_HEADER -split ":\s*", 2
$headers = @{$headerbits[0]=$headerbits[1]; "Content-Type" = "application/json"}
$body = @{'status'='ERROR'; 'externalLogsUrl'="$env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID"} | ConvertTo-JSON
Invoke-WebRequest $env:ARIA_AT_STATUS_URL -Headers $headers -Method 'POST' -Body $body
- name: Log job state COMPLETED
shell: powershell
if: inputs.status_url
if: success() && inputs.status_url
run: |
$headerbits = $env:ARIA_AT_CALLBACK_HEADER -split ":\s*", 2
$headers = @{$headerbits[0]=$headerbits[1]; "Content-Type" = "application/json"}
Expand All @@ -193,6 +201,7 @@ jobs:
- name: upload *.{log,png}
uses: actions/upload-artifact@v4
if: always()
with:
name: logs
path: |
Expand Down

0 comments on commit cb2e325

Please sign in to comment.