88
99 services :
1010 postgres :
11- image : postgres:12
11+ image : postgres:13
1212 env :
1313 POSTGRES_USER : ' postgres'
1414 POSTGRES_HOST_AUTH_METHOD : ' trust'
@@ -28,16 +28,24 @@ jobs:
2828 fail-fast : false
2929 matrix :
3030 include :
31- # Highest php versions supported by each branch (with master always being tested twice).
32- - php : 8.0
33- moodle-branch : master
31+ # Highest php versions supported by each branch (with main always being tested twice).
32+ - php : 8.2
33+ moodle-branch : main
3434 database : pgsql
35- - php : 8.0
36- moodle-branch : master
35+ - php : 8.2
36+ moodle-branch : main
3737 database : mariadb
38- - php : 8.0
38+ - php : 8.2
39+ moodle-branch : MOODLE_403_STABLE
40+ database : pgsql
41+ - php : 8.2
42+ moodle-branch : MOODLE_402_STABLE
43+ database : pgsql
44+
45+ - php : 8.1
3946 moodle-branch : MOODLE_401_STABLE
4047 database : pgsql
48+
4149 - php : 8.0
4250 moodle-branch : MOODLE_400_STABLE
4351 database : pgsql
@@ -58,29 +66,22 @@ jobs:
5866 moodle-branch : MOODLE_39_STABLE
5967 database : pgsql
6068
61- # Lowest php versions supported by each branch (with master always being tested twice).
62- - php : 7.4
63- moodle-branch : master
69+ # Lowest php versions supported by each branch (with main always being tested twice).
70+ - php : 8.1
71+ moodle-branch : main
6472 database : pgsql
65- - php : 7.4
66- moodle-branch : master
73+ - php : 8.1
74+ moodle-branch : main
6775 database : mariadb
68- - php : 7.4
69- moodle-branch : MOODLE_401_STABLE
70- database : pgsql
71-
72- - php : 7.3
73- moodle-branch : MOODLE_400_STABLE
76+ - php : 8.0
77+ moodle-branch : MOODLE_403_STABLE
7478 database : pgsql
75- - php : 7.3
76- moodle-branch : MOODLE_311_STABLE
79+ - php : 8.0
80+ moodle-branch : MOODLE_402_STABLE
7781 database : pgsql
7882
79- - php : 7.2
80- moodle-branch : MOODLE_310_STABLE
81- database : pgsql
82- - php : 7.2
83- moodle-branch : MOODLE_39_STABLE
83+ - php : 7.4
84+ moodle-branch : MOODLE_401_STABLE
8485 database : pgsql
8586 steps :
8687 - name : Check out repository code
@@ -113,47 +114,52 @@ jobs:
113114 IGNORE_PATHS : tests/fixtures
114115
115116 - name : PHP Lint
116- if : ${{ always () }}
117+ if : ${{ !cancelled () }}
117118 run : moodle-plugin-ci phplint
118119
119120 - name : PHP Copy/Paste Detector
120121 continue-on-error : true # This step will show errors but will not fail
121- if : ${{ always () }}
122+ if : ${{ !cancelled () }}
122123 run : moodle-plugin-ci phpcpd
123124
124125 - name : PHP Mess Detector
125126 continue-on-error : true # This step will show errors but will not fail
126- if : ${{ always () }}
127+ if : ${{ !cancelled () }}
127128 run : moodle-plugin-ci phpmd
128129
129130 - name : Moodle Code Checker
130- if : ${{ always () }}
131+ if : ${{ !cancelled () }}
131132 run : moodle-plugin-ci codechecker --max-warnings 0
132133
133134 - name : Moodle PHPDoc Checker
134- if : ${{ always() }}
135- run : moodle-plugin-ci phpdoc
135+ if : ${{ !cancelled() }}
136+ run : |
137+ moodle-plugin-ci phpdoc
136138
137139 - name : Validating
138- if : ${{ always () }}
140+ if : ${{ !cancelled () }}
139141 run : moodle-plugin-ci validate
140142
141143 - name : Check upgrade savepoints
142- if : ${{ always () }}
144+ if : ${{ !cancelled () }}
143145 run : moodle-plugin-ci savepoints
144146
145147 - name : Mustache Lint
146- if : ${{ always () }}
148+ if : ${{ !cancelled () }}
147149 run : moodle-plugin-ci mustache
148150
149151 - name : Grunt
150- if : ${{ always () }}
152+ if : ${{ !cancelled () }}
151153 run : moodle-plugin-ci grunt --max-lint-warnings 0
152154
153- # - name: PHPUnit tests
154- # if: ${{ always () }}
155- # run: moodle-plugin-ci phpunit
155+ # - name: PHPUnit tests
156+ # if: ${{ !cancelled () }}
157+ # run: moodle-plugin-ci phpunit
156158
157159 - name : Behat features
158- if : ${{ always () }}
160+ if : ${{ !cancelled () }}
159161 run : moodle-plugin-ci behat --profile chrome
162+
163+ - name : Mark cancelled jobs as failed.
164+ if : ${{ cancelled() }}
165+ run : exit 1
0 commit comments