Skip to content

Commit 0126f1d

Browse files
committed
fix(ci): Make workflow fail on testing
It will not hurt even if the commit is marked failed, this way it would be easier to understand why (could be test or analyze) Origin: SiliconLabsSoftware/z-wave-engine-application-layer#89 Relate-to: SiliconLabsSoftware/z-wave-engine-application-layer#73 Relate-to: #100 Forwarded: #134 Signed-off-by: Philippe Coval <[email protected]>
1 parent 22c5997 commit 0126f1d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,19 @@ jobs:
106106
- name: Propagate status on fail
107107
# yamllint disable-line rule:line-length
108108
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
109-
if: failure()
109+
if: always()
110110
env:
111111
status: ${{ steps.run.outcome }}
112112
sha: ${{ github.event.workflow_run.head_commit.id }}
113113
with:
114114
script: |
115+
if (process.env.status != 'success') {
115116
await github.rest.repos.createCommitStatus({
116117
owner: context.repo.owner,
117118
repo: context.repo.repo,
118119
sha: process.env.sha,
119120
state: 'failure'
120121
})
121122
core.setFailed(`Status: ${process.env.status}`);
123+
process.exit(1);
124+
}

0 commit comments

Comments
 (0)