From 0e10999c1ff295bfeffbd4627fc23e8c8c256e26 Mon Sep 17 00:00:00 2001 From: "Mx. Corey Frang" Date: Wed, 27 Mar 2024 14:07:21 -0400 Subject: [PATCH 1/2] add callback to log the ERROR status for the error job --- .github/workflows/nvda-test.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nvda-test.yml b/.github/workflows/nvda-test.yml index 5329f59..8ced884 100644 --- a/.github/workflows/nvda-test.yml +++ b/.github/workflows/nvda-test.yml @@ -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"} @@ -193,6 +201,7 @@ jobs: - name: upload *.{log,png} uses: actions/upload-artifact@v4 + if: always() with: name: logs path: | From 1390571c3c91a9773fa4fb80ed62b5c50d69560c Mon Sep 17 00:00:00 2001 From: "Mx. Corey Frang" Date: Thu, 28 Mar 2024 15:30:21 -0400 Subject: [PATCH 2/2] remove expression syntax test --- .github/workflows/nvda-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nvda-test.yml b/.github/workflows/nvda-test.yml index 8ced884..85e72ec 100644 --- a/.github/workflows/nvda-test.yml +++ b/.github/workflows/nvda-test.yml @@ -183,7 +183,7 @@ jobs: - name: Log job state ERROR shell: powershell - if: ${{ failure() && inputs.status_url }} + if: failure() && inputs.status_url run: | $headerbits = $env:ARIA_AT_CALLBACK_HEADER -split ":\s*", 2 $headers = @{$headerbits[0]=$headerbits[1]; "Content-Type" = "application/json"} @@ -192,7 +192,7 @@ jobs: - name: Log job state COMPLETED shell: powershell - if: ${{ success() && 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"}