Skip to content

Commit e7baf2e

Browse files
committed
fail manually
1 parent b5a7ca1 commit e7baf2e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
fetch-depth: 2
106106

107107
- name: check typos
108+
id: typo_check
108109
if: ${{ env.CI_JOB_NAME == 'mingw-check-tidy' }}
109110
# don't fail job on typos
110111
continue-on-error: true
@@ -247,6 +248,15 @@ jobs:
247248
npm install -g @datadog/datadog-ci@^2.x.x
248249
python3 src/ci/scripts/upload-build-metrics.py build/cpu-usage.csv
249250
251+
# If pr have typos, we don't fail immediately, but allow job to continue,
252+
# but still want job to fail at the end. Without this, job will be marked as
253+
# 'success', even if there is typos, so fail it manually.
254+
#
255+
# also see https://github.com/actions/runner/issues/2347
256+
- name: check typos
257+
if: ${{ env.CI_JOB_NAME == 'mingw-check-tidy' && steps.typo_check.outcome == 'failure' && steps.typo_check.conclusion == 'success' }}
258+
run: exit 1
259+
250260
# This job isused to tell bors the final status of the build, as there is no practical way to detect
251261
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
252262
outcome:

0 commit comments

Comments
 (0)