Skip to content

Commit c5614a8

Browse files
committed
Update moodle-plugin-ci config
1 parent 8b97690 commit c5614a8

File tree

1 file changed

+39
-29
lines changed

1 file changed

+39
-29
lines changed

.github/workflows/ci.yml

+39-29
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,19 @@ jobs:
88
fail-fast: false
99
matrix:
1010
include:
11-
- php: '7.4'
11+
- php: '8.2'
1212
moodle-branch: 'master'
1313
database: 'pgsql'
14-
- php: '7.4'
15-
moodle-branch: 'MOODLE_311_STABLE'
14+
- php: '8.2'
15+
moodle-branch: 'MOODLE_403_STABLE'
1616
database: 'mariadb'
17+
- php: '8.1'
18+
moodle-branch: 'MOODLE_402_STABLE'
19+
database: 'pgsql'
1720

1821
services:
1922
postgres:
20-
image: postgres
23+
image: postgres:14
2124
env:
2225
POSTGRES_USER: 'postgres'
2326
POSTGRES_HOST_AUTH_METHOD: 'trust'
@@ -30,38 +33,39 @@ jobs:
3033
- 5432:5432
3134

3235
mariadb:
33-
image: mariadb
36+
image: mariadb:10
3437
env:
3538
MYSQL_USER: 'root'
3639
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
40+
MYSQL_CHARACTER_SET_SERVER: "utf8mb4"
41+
MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci"
3742
ports:
3843
- 3306:3306
3944
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3
4045

4146
steps:
4247
- name: Checkout
43-
uses: actions/checkout@v2
48+
uses: actions/checkout@v3
4449
with:
4550
path: plugin
4651

47-
- name: Setup PHP
52+
- name: Setup PHP ${{ matrix.php }}
4853
uses: shivammathur/setup-php@v2
4954
with:
5055
php-version: ${{ matrix.php }}
51-
extensions: mbstring, pgsql, mysqli
52-
# tools: phpunit
53-
# coverage: none
56+
extensions: ${{ matrix.extensions }}
57+
ini-values: max_input_vars=5000
58+
coverage: none
5459

55-
- name: Deploy moodle-plugin-ci
60+
- name: Initialise moodle-plugin-ci
5661
run: |
57-
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
58-
# Add dirs to $PATH
62+
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^4
5963
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
6064
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
61-
# PHPUnit depends on en_AU.UTF-8 locale
6265
sudo locale-gen en_AU.UTF-8
66+
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
6367
64-
- name: Install Moodle
68+
- name: Install moodle-plugin-ci
6569
run: |
6670
moodle-plugin-ci add-plugin --branch main moodleou/moodle-editor_ousupsub
6771
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
@@ -73,38 +77,44 @@ jobs:
7377
if: ${{ always() }}
7478
run: moodle-plugin-ci phplint
7579

76-
- name: phpcpd
80+
- name: PHP Copy/Paste Detector
81+
continue-on-error: true # This step will show errors but will not fail.
7782
if: ${{ always() }}
78-
run: moodle-plugin-ci phpcpd || true
83+
run: moodle-plugin-ci phpcpd
7984

80-
- name: phpmd
85+
- name: PHP Mess Detector
8186
if: ${{ always() }}
8287
run: moodle-plugin-ci phpmd
8388

84-
- name: codechecker
89+
- name: Moodle Code Checker
90+
if: ${{ always() }}
91+
run: moodle-plugin-ci phpcs --max-warnings 0
92+
93+
- name: Moodle PHPDoc Checker
94+
continue-on-error: true # This step will show errors but will not fail.
8595
if: ${{ always() }}
86-
run: moodle-plugin-ci codechecker
96+
run: moodle-plugin-ci phpdoc
8797

88-
- name: validate
98+
- name: Validating
8999
if: ${{ always() }}
90100
run: moodle-plugin-ci validate
91101

92-
- name: savepoints
102+
- name: Check upgrade savepoints
93103
if: ${{ always() }}
94104
run: moodle-plugin-ci savepoints
95105

96-
- name: mustache
106+
- name: Mustache Lint
97107
if: ${{ always() }}
98108
run: moodle-plugin-ci mustache
99109

100-
- name: grunt
101-
if: ${{ always() }}
102-
run: moodle-plugin-ci grunt
110+
- name: Grunt
111+
if: ${{ matrix.moodle-branch == 'MOODLE_401_STABLE' }}
112+
run: moodle-plugin-ci grunt --max-lint-warnings 0
103113

104-
- name: phpunit
114+
- name: PHPUnit tests
105115
if: ${{ always() }}
106-
run: moodle-plugin-ci phpunit
116+
run: moodle-plugin-ci phpunit --fail-on-warning
107117

108-
- name: behat
118+
- name: Behat features
109119
if: ${{ always() }}
110120
run: moodle-plugin-ci behat --profile chrome

0 commit comments

Comments
 (0)