Skip to content

Commit 9094fb2

Browse files
committed
allow expected failures
1 parent 1f48cd0 commit 9094fb2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ jobs:
4141
- ["envs/env1.yaml"]
4242
- ["envs/env2.yaml"]
4343
- ["envs/env1.yaml", "envs/env2.yaml"]
44+
expected-failure: false
45+
include:
46+
- env-paths: ["envs/failing-env1.yaml"]
47+
expected-failure: true
4448

4549
steps:
4650
- name: clone the repository
@@ -49,3 +53,12 @@ jobs:
4953
uses: ./
5054
with:
5155
environment-paths: "${{ toJSON(matrix.env-paths) }}"
56+
- name: evaluate failures
57+
if: |
58+
always()
59+
&& (
60+
(failure() && ! ${{ matrix.expected-failure }})
61+
|| (success() && ${{ matrix.expected-failure }})
62+
)
63+
shell: bash -l {0}
64+
run: exit 1

0 commit comments

Comments
 (0)