Skip to content

Commit 42dba87

Browse files
authored
Update plugin CI template & matrix for PHP8.2 (#14)
1 parent 23d79c5 commit 42dba87

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

.github/workflows/moodle-ci.yml

+28-23
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,25 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
include:
34-
- php: '8.1'
35-
moodle-branch: 'master'
34+
- php: '8.2'
35+
moodle-branch: 'main'
3636
database: 'mariadb'
37-
- php: '8.1'
38-
moodle-branch: 'master'
37+
- php: '8.2'
38+
moodle-branch: 'main'
3939
database: 'pgsql'
40+
- php: '8.1'
41+
moodle-branch: 'MOODLE_403_STABLE'
42+
database: 'mariadb'
4043
- php: '8.0'
4144
moodle-branch: 'MOODLE_402_STABLE'
45+
database: 'pgsql'
46+
- php: '8.0'
47+
moodle-branch: 'MOODLE_401_STABLE'
4248
database: 'mariadb'
4349

4450
steps:
4551
- name: Check out repository code
46-
uses: actions/checkout@v3
52+
uses: actions/checkout@v4
4753
with:
4854
path: plugin
4955

@@ -66,55 +72,54 @@ jobs:
6672
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
6773
6874
- name: Install moodle-plugin-ci
69-
run: |
70-
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
75+
run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
7176
env:
7277
DB: ${{ matrix.database }}
7378
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
74-
MUSTACHE_IGNORE_NAMES: 'content.mustache'
79+
# Uncomment this to run Behat tests using the Moodle App.
80+
# MOODLE_APP: 'true'
7581

7682
- name: PHP Lint
77-
if: ${{ always() }}
83+
if: ${{ !cancelled() }}
7884
run: moodle-plugin-ci phplint
7985

80-
- name: PHP Copy/Paste Detector
81-
continue-on-error: true # This step will show errors but will not fail
82-
if: ${{ always() }}
83-
run: moodle-plugin-ci phpcpd
84-
8586
- name: PHP Mess Detector
8687
continue-on-error: true # This step will show errors but will not fail
87-
if: ${{ always() }}
88+
if: ${{ !cancelled() }}
8889
run: moodle-plugin-ci phpmd
8990

9091
- name: Moodle Code Checker
91-
if: ${{ always() }}
92+
if: ${{ !cancelled() }}
9293
run: moodle-plugin-ci phpcs --max-warnings 0
9394

9495
- name: Moodle PHPDoc Checker
95-
if: ${{ always() }}
96+
if: ${{ !cancelled() }}
9697
run: moodle-plugin-ci phpdoc --max-warnings 0
9798

9899
- name: Validating
99-
if: ${{ always() }}
100+
if: ${{ !cancelled() }}
100101
run: moodle-plugin-ci validate
101102

102103
- name: Check upgrade savepoints
103-
if: ${{ always() }}
104+
if: ${{ !cancelled() }}
104105
run: moodle-plugin-ci savepoints
105106

106107
- name: Mustache Lint
107-
if: ${{ always() }}
108+
if: ${{ false }}
108109
run: moodle-plugin-ci mustache
109110

110111
- name: Grunt
111-
if: ${{ always() }}
112+
if: ${{ !cancelled() }}
112113
run: moodle-plugin-ci grunt --max-lint-warnings 0
113114

114115
- name: PHPUnit tests
115-
if: ${{ always() }}
116+
if: ${{ !cancelled() }}
116117
run: moodle-plugin-ci phpunit --fail-on-warning
117118

118119
- name: Behat features
119-
if: ${{ always() }}
120+
if: ${{ !cancelled() }}
120121
run: moodle-plugin-ci behat --profile chrome
122+
123+
- name: Mark cancelled jobs as failed.
124+
if: ${{ cancelled() }}
125+
run: exit 1

0 commit comments

Comments
 (0)