-
Notifications
You must be signed in to change notification settings - Fork 876
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
Please support something like "allow-failure" for a given job #2347
Comments
Hey @mvo5 Thanks for the feature request! We do support marking a step to allow failure via continue-on-error. We also support marking specific checks as required I think the latter should solve your issue at the job level, is there a reason that doesn't well for you? |
Hey @thboop. Thanks for your quick reply! Yeah, it's really just about the little green tick at the pull-request overview page. AFAICT when one job (even if it's not required) fails the overview PR list will show this PR as failed. Having a way to mark certain jobs as not rquired would still show the pulls as green (or yellow?) instead of red. But I do understand this is a bit of a specific request, so feel free to close it if you think it's a bit too odd. We had it with our old CI system and I liked it. |
I don't think it is that specific. People have requested this before: https://github.community/t5/GitHub-Actions/continue-on-error-allow-failure-UI-indication/td-p/37033 I just came here via Google as I was surprised I couldn't find anything like this in the documentation. It's standard with e.g. Travis CI |
I guess one way to handle this would be for jobs with an |
I'm also an Actions user who would love to see this feature. My team's project has a long build and a few jobs that are flaky and frequently take a while to fix. We do just ignore failures on those for merging PRs, but being able to make the green tick agree with that convention would be really nice. |
This would be great |
in the interim, what if there was a step that simply posted the "allowed failures" in a comment (that same comment updated each time the workflow ran). Similar CodeCov. according to the docs, this is a detectable condition:
|
I thought that |
By default, when any job within a workflow fails, all the other jobs are cancelled (unless 'fail-fast' is False). |
Not only does Maybe it is? Here's the documentation example verbatim: runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
node: [11, 12]
os: [macos-latest, ubuntu-18.04]
experimental: [false]
include:
- node: 13
os: ubuntu-18.04
experimental: true My version looks similar: unit-tests:
name: "Unit Tests"
runs-on: ${{ matrix.operating-system }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
dependencies:
- "lowest"
- "highest"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"
experimental: [false]
include:
- php: "8.0"
composer-options: "--ignore-platform-reqs"
experimental: true When this runs, it fails at the
Somehow, it's getting an empty string for When I remove the line that defines So, maybe the successful build is not actually taking into account the |
@ramsey your issue doesn't seem related to the thread. Your job is failing because your |
Why does my |
@nschonni You were right. Turns out, I had my matrix messed up. Sorry for the churn here, y'all. 😀 |
This is one solution - name: Install dependencies
id: composer-run
continue-on-error: true
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Execute tests
if: steps.composer-run.outcome == 'success' && steps.composer-run.conclusion == 'success'
run: vendor/bin/phpunit
|
I‘d need something like this to allow a whole workflow to be optional (not getting a notification on failure). It‘s a workflow with a task like „Check if parent Docker Image was updated“ with a nightly run. If there was no update the Job fails and I’ll get a notification about failure, but in this case the job is designed to fail (most of the time) and should not spam my mails. This one here: https://github.com/dersimn/HelloARM-GitHub-Workflow/blob/master/.github/workflows/auto-build-on-base-image-change.yml |
@dersimn check-job:
outputs:
needs-updating: ${{ steps.check.outputs.needs-updating }} Then remove the |
Edit from @vanZeben:
We use github actions in our "snapd" project and we love them.
One small feature we would love to see is a way to mark a test job as "allow-failure" (or a term along these lines) [0]. This would simply mean that the overall /pulls overview page would show the PR as with the little green tick-mark (and maybe in the tooltip 5/6 OK, 1 ignored). It would still show as a failure in the details view (maybe with a different icon?).
Our use-case is that we have some CI environments that fail frequently because of external factors like repository mirrors that are our of sync etc. We still want to run the CI on these systems but not get distracted too much by these out-of-our-control issues.
Hope this makes sense.
Thanks!
Michael
[0] E.g.
The text was updated successfully, but these errors were encountered: