Skip to content

Commit f307c4e

Browse files
committed
Update CI workflow
1 parent 9b5757b commit f307c4e

File tree

1 file changed

+22
-16
lines changed

1 file changed

+22
-16
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
strategy:
3838
fail-fast: false
3939
matrix:
40-
php: ['7.4', '8.0', '8.1']
41-
moodle-branch: ['MOODLE_401_STABLE']
40+
php: ['8.0', '8.1', '8.2']
41+
moodle-branch: ['MOODLE_403_STABLE']
4242
database: [pgsql, mariadb]
4343

4444
steps:
@@ -66,55 +66,61 @@ jobs:
6666
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
6767
6868
- name: Install moodle-plugin-ci
69-
run: |
70-
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
69+
run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
7170
env:
7271
DB: ${{ matrix.database }}
7372
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
73+
# Uncomment this to run Behat tests using the Moodle App.
74+
# MOODLE_APP: 'true'
7475

7576
- name: PHP Lint
76-
if: ${{ always() }}
77+
if: ${{ !cancelled() }}
7778
run: moodle-plugin-ci phplint
7879

7980
- name: PHP Copy/Paste Detector
8081
continue-on-error: true # This step will show errors but will not fail
81-
if: ${{ always() }}
82+
if: ${{ !cancelled() }}
8283
run: moodle-plugin-ci phpcpd
8384

85+
# For now, assume this succeeds.
8486
- name: PHP Mess Detector
8587
continue-on-error: true # This step will show errors but will not fail
86-
if: ${{ always() }}
88+
if: ${{ !cancelled() }}
8789
run: moodle-plugin-ci phpmd || true
8890

8991
- name: Moodle Code Checker
90-
if: ${{ always() }}
92+
if: ${{ !cancelled() }}
9193
run: moodle-plugin-ci phpcs --max-warnings 0
9294

9395
- name: Moodle PHPDoc Checker
94-
if: ${{ always() }}
96+
if: ${{ !cancelled() }}
9597
run: moodle-plugin-ci phpdoc --max-warnings 0
9698

9799
- name: Validating
98-
if: ${{ always() }}
100+
if: ${{ !cancelled() }}
99101
run: moodle-plugin-ci validate
100102

101103
- name: Check upgrade savepoints
102-
if: ${{ always() }}
104+
if: ${{ !cancelled() }}
103105
run: moodle-plugin-ci savepoints
104106

105107
- name: Mustache Lint
106-
if: ${{ always() }}
108+
if: ${{ !cancelled() }}
107109
run: moodle-plugin-ci mustache
108110

109-
# At this stage, assume this succeeds.
111+
# For now, assume this succeeds.
110112
- name: Grunt
111-
if: ${{ always() }}
113+
if: ${{ !cancelled() }}
112114
run: moodle-plugin-ci grunt --max-lint-warnings 0 || true
113115

114116
- name: PHPUnit tests
115-
if: ${{ always() }}
117+
if: ${{ !cancelled() }}
116118
run: moodle-plugin-ci phpunit --fail-on-warning
117119

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

0 commit comments

Comments
 (0)