Building upon the discussion here, I’d like a way for a job to run even though a previous job in the workflow has failed in some way.
I know about
when for a step, but there doesn’t seem to be something like this for a workflow’s job.
We’re currently having to do something like
test_lib || true to make the CI step pass even though it’s actually a failure. That’s definitely a code smell to us.
Example use case:
# this is a `job` in CircleCI's vernacular - report_build_statuses: requires: - install_gem_dependencies - lint_with_danger - build_app - test_lib filters: *ignore_certain_pr_builds
In this scenario, I’d like the
report_build_statuses job to run even though the
test_lib job failed some tests (and it depends on that job running, either successfully or not, before it can run).
So this would:
- Report back to Github that
test_libfailed its tests
report_build_statuseswhich would summarize those failings in a GitHub comment (we do this using Danger) and avoids us having to dig through CircleCI logs to figure out what failed
Currently, it just fails the
test_lib job and then never runs
report_build_statuses because apparently the
requires keyword has the requirement that each job succeeds rather than just requiring that each job runs.