Skip to content

Add if condition to Upload Test Result Files step to handle test failures#2209

Merged
jzabroski merged 3 commits into
mainfrom
copilot/update-upload-artifact-handling
Dec 4, 2025
Merged

Add if condition to Upload Test Result Files step to handle test failures#2209
jzabroski merged 3 commits into
mainfrom
copilot/update-upload-artifact-handling

Conversation

Copilot AI commented Dec 4, 2025

Copy link
Copy Markdown
Contributor
  • Add if: '!cancelled()' to the "Upload Test Result Files" step
  • Add if: '!cancelled()' to the "Combine Coverage Reports" step
  • Add if: '!cancelled()' to the "Upload Combined Coverage XML" step
  • Verify the YAML syntax is valid
  • Run code review - passed with no issues
  • Run CodeQL security check - no alerts found

This ensures that when the "Restore, Build, Test" step fails, the .trx test result files and coverage reports are still processed and uploaded as artifacts for debugging purposes, but will be skipped if the job is cancelled.

Original prompt

This section details on the original issue you should resolve

<issue_title>Update pull-requests.yaml to handle test failures gracefully</issue_title>
<issue_description>Describe the bug
Currently, when a the step "Restore, Build, Test" fails in pull-requests.yaml https://github.com/fluentmigrator/fluentmigrator/blob/main/.github/workflows/pull-requests.yaml#L115C13-L115C33, the associated .trx files from test runs are lost. Please use the upload-artifact action to upload unless the step was cancelled.

See: https://github.com/fluentmigrator/fluentmigrator/actions/runs/19876982980/job/57080440258 for additional context</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Update pull-requests.yaml to handle test failures gracefully Add if condition to Upload Test Result Files step to handle test failures Dec 4, 2025
Copilot AI requested a review from jzabroski December 4, 2025 23:33
@jzabroski

Copy link
Copy Markdown
Collaborator

@copilot I think you are missing if: (!cancelled()) on an additional step that is meant to combine all coverage reports that get output:

    - name: Combine Coverage Reports
      uses: danielpalme/[email protected]
      if: (!cancelled())

Copilot AI commented Dec 4, 2025

Copy link
Copy Markdown
Contributor Author

@copilot I think you are missing if: (!cancelled()) on an additional step that is meant to combine all coverage reports that get output:

...

Added if: '!cancelled()' to both "Combine Coverage Reports" and "Upload Combined Coverage XML" steps in commit 1fe1b1c.

@jzabroski
jzabroski marked this pull request as ready for review December 4, 2025 23:40
@jzabroski
jzabroski merged commit d4918cf into main Dec 4, 2025
4 of 5 checks passed
@jzabroski
jzabroski deleted the copilot/update-upload-artifact-handling branch December 4, 2025 23:40
Copilot AI requested a review from jzabroski December 4, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update pull-requests.yaml to handle test failures gracefully

2 participants