File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 3838 steps :
3939 - name : Checkout sources
4040 uses : actions/checkout@v4
41- - name : Fail to emit some test metrics
41+ - id : expected-failure
42+ name : Fail to emit some test metrics
4243 uses : ./.github/actions/emit-metrics
4344 continue-on-error : true
4445 with :
5152 BuildTime:4.532:Seconds
5253 BuildSucceeded:1:Count
5354 - name : Handle expected failure
54- if : ${{ failure() }}
5555 shell : bash
5656 run : |
57- echo Saw expected failure from attempting to emit metrics when kat isn't installed.
58- echo All good now!
59- exit 0
57+ if [[ ${{ steps.expected-failure.outcome }} == "failure" ]]; then
58+ echo Saw expected failure from attempting to emit metrics when kat isn't installed.
59+ exit 0
60+ else
61+ echo Expected failure from previous step!
62+ exit 1
63+ fi
You can’t perform that action at this time.
0 commit comments