@@ -135,49 +135,53 @@ jobs:
135135 # can be re-ordered or removed to your liking. And of course, you can
136136 # add any of your own custom steps.
137137 - name : PHP Lint
138- if : ${{ always () }} # prevents CI run stopping if step failed.
138+ if : ${{ !cancelled () }} # prevents CI run stopping if step failed.
139139 run : moodle-plugin-ci phplint
140140
141141 - name : PHP Copy/Paste Detector
142142 continue-on-error : true # This step will show errors but will not fail
143- if : ${{ always () }}
143+ if : ${{ !cancelled () }}
144144 run : moodle-plugin-ci phpcpd
145145
146146 - name : PHP Mess Detector
147147 continue-on-error : true
148- if : ${{ always () }}
148+ if : ${{ !cancelled () }}
149149 run : moodle-plugin-ci phpmd
150150
151151 - name : Moodle Code Checker
152- if : ${{ always () }}
152+ if : ${{ !cancelled () }}
153153 run : moodle-plugin-ci phpcs --max-warnings 0
154154
155155 - name : Moodle PHPDoc Checker
156- if : ${{ always () }}
156+ if : ${{ !cancelled () }}
157157 run : moodle-plugin-ci phpdoc --max-warnings 0
158158
159159 - name : Validating
160- if : ${{ always () }}
160+ if : ${{ !cancelled () }}
161161 run : moodle-plugin-ci validate
162162
163163 - name : Check upgrade savepoints
164- if : ${{ always () }}
164+ if : ${{ !cancelled () }}
165165 run : moodle-plugin-ci savepoints
166166
167167 - name : Mustache Lint
168- if : ${{ always () }}
168+ if : ${{ !cancelled () }}
169169 run : moodle-plugin-ci mustache
170170
171171 - name : Grunt
172- if : ${{ always () }}
172+ if : ${{ !cancelled () }}
173173 run : moodle-plugin-ci grunt --max-lint-warnings 0
174174
175175 - name : PHPUnit tests
176- if : ${{ always () }}
176+ if : ${{ !cancelled () }}
177177 run : moodle-plugin-ci phpunit
178178
179179 - name : Behat features
180- if : ${{ always () }}
180+ if : ${{ !cancelled () }}
181181 run : moodle-plugin-ci behat --profile chrome
182+
183+ - name : Mark cancelled jobs as failed.
184+ if : ${{ cancelled() }}
185+ run : exit 1
182186` ` `
183187<!-- {% endraw %} -->
0 commit comments