99 strategy :
1010 matrix :
1111 php : ['8.2']
12- moodle-branch : ['MOODLE_403_STABLE ']
12+ moodle-branch : ['MOODLE_404_STABLE ']
1313 database : ['pgsql']
1414
1515 steps :
1616 - name : Start PostgreSQL
1717 run : docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:14
1818
1919 - name : Check out repository code
20- uses : actions/checkout@v3
20+ uses : actions/checkout@v4
2121 with :
2222 path : plugin
2323
2828 ini-values : max_input_vars=5000
2929 coverage : none
3030
31- - name : Get composer cache directory
32- id : composer-cache
33- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
34-
35- - name : Composer cache
36- uses : actions/cache@v3
37- with :
38- path : ${{ steps.composer-cache.outputs.dir }}
39- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
40- restore-keys : |
41- ${{ runner.os }}-composer-
42-
43- - name : npm cache
44- uses : actions/cache@v3
45- with :
46- path : ~/.npm
47- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
48- restore-keys : |
49- ${{ runner.os }}-node-
50-
5131 - name : Initialise moodle-plugin-ci
5232 run : |
53- composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
33+ composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
5434 echo $(cd ci/bin; pwd) >> $GITHUB_PATH
5535 echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
5636 sudo locale-gen en_AU.UTF-8
6747 if : ${{ always() }}
6848 run : moodle-plugin-ci phplint
6949
70- - name : PHP Copy/Paste Detector
71- if : ${{ always() }}
72- run : moodle-plugin-ci phpcpd
73-
7450 - name : PHP Mess Detector
7551 if : ${{ always() }}
7652 run : moodle-plugin-ci phpmd
8258 - name : Moodle PHPDoc Checker
8359 if : ${{ always() }}
8460 run : moodle-plugin-ci phpdoc
85- continue-on-error : true
8661
8762 - name : Validating
8863 if : ${{ always() }}
@@ -108,30 +83,20 @@ jobs:
10883 fail-fast : false
10984 matrix :
11085 php : ['8.0', '8.1', '8.2']
111- moodle-branch : ['MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'MOODLE_403_STABLE']
86+ moodle-branch : ['MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'MOODLE_403_STABLE', 'MOODLE_404_STABLE' ]
11287 database : ['mariadb', 'pgsql']
11388 exclude :
89+ - php : ' 8.0'
90+ moodle-branch : ' MOODLE_404_STABLE'
11491 - php : ' 8.2'
11592 moodle-branch : ' MOODLE_401_STABLE'
11693 include :
11794 - php : ' 7.4'
118- moodle-branch : ' MOODLE_39_STABLE'
119- database : ' mariadb'
120- - php : ' 7.4'
121- moodle-branch : ' MOODLE_39_STABLE'
122- database : ' pgsql'
123- - php : ' 8.0'
124- moodle-branch : ' MOODLE_311_STABLE'
125- database : ' mariadb'
126- - php : ' 8.0'
127- moodle-branch : ' MOODLE_311_STABLE'
95+ moodle-branch : ' MOODLE_401_STABLE'
12896 database : ' pgsql'
129- - php : ' 8.0 '
130- moodle-branch : ' MOODLE_400_STABLE '
97+ - php : ' 7.4 '
98+ moodle-branch : ' MOODLE_401_STABLE '
13199 database : ' mariadb'
132- - php : ' 8.0'
133- moodle-branch : ' MOODLE_400_STABLE'
134- database : ' pgsql'
135100
136101 steps :
137102 - name : Start MariaDB
@@ -143,7 +108,7 @@ jobs:
143108 run : docker run -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_HOST_AUTH_METHOD=trust -d postgres:14
144109
145110 - name : Check out repository code
146- uses : actions/checkout@v3
111+ uses : actions/checkout@v4
147112 with :
148113 path : plugin
149114
@@ -154,24 +119,6 @@ jobs:
154119 ini-values : max_input_vars=5000
155120 coverage : none
156121
157- - name : Get composer cache directory
158- id : composer-cache
159- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
160- - name : Composer cache
161- uses : actions/cache@v3
162- with :
163- path : ${{ steps.composer-cache.outputs.dir }}
164- key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
165- restore-keys : |
166- ${{ runner.os }}-composer-
167- - name : npm cache
168- uses : actions/cache@v3
169- with :
170- path : ~/.npm
171- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
172- restore-keys : |
173- ${{ runner.os }}-node-
174-
175122 - name : Initialise moodle-plugin-ci
176123 run : |
177124 composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
@@ -194,3 +141,15 @@ jobs:
194141 - name : Behat features
195142 if : ${{ always() }}
196143 run : moodle-plugin-ci behat --profile chrome --auto-rerun 0
144+
145+ # This step allows to upload Behat faildump (screenshots) as workflow artifact,
146+ # so it can be downloaded and inspected. You don't need this step if you
147+ # are not running Behat test. Artifact will be retained for 7 days.
148+ - name : Upload Behat Faildump
149+ if : ${{ failure() && steps.behat.outcome == 'failure' }}
150+ uses : actions/upload-artifact@v4
151+ with :
152+ name : Behat Faildump (${{ join(matrix.*, ', ') }})
153+ path : ${{ github.workspace }}/moodledata/behat_dump
154+ retention-days : 7
155+ if-no-files-found : ignore
0 commit comments