-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to get a green checkmark even though an optional job failed #1347
Conversation
Emitting a warning adds an annotation to the job, which you might notice (but probably won't) if you look at the job (which you normally wouldn't do). So that's unsatisfying. |
GITHUB_STEP_SUMMARY output goes into the workflow summary page, but that is not exactly a thing you'd see normally either… not great. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1347 +/- ##
==========================================
- Coverage 69.00% 68.97% -0.03%
==========================================
Files 181 181
Lines 8865 8865
Branches 1484 1484
==========================================
- Hits 6117 6115 -2
- Misses 2648 2649 +1
- Partials 100 101 +1 ☔ View full report in Codecov by Sentry. |
|
status=0 | ||
tox run -e "${TOX_ENV}" || status=$? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC $?
is a feature of any shell, most likely any shell in Microsoft Github Actions, therefore both lines can be condensed to a single line on the second lines' composition:
tox run -e "${TOX_ENV}"; status=$?
Thanks for posting a useful comment updating the other thread! @wsanchez
GHA workflows fail when a job fails.
We use
continue-on-error
to prevent halting the workflow, and that is good enough for validation prior to merge, it leaves us with a visually annoying red X where we want to see a green checkmark.What we want is support in GHA for the workflow to ignore specific job failures, but that doesn't exist. (A very popular but unimplemented feature request already exists for this.)
This PR is an attempt at a work-around.