8
8
fail-fast : false
9
9
matrix :
10
10
include :
11
- - php : ' 7.4 '
11
+ - php : ' 8.2 '
12
12
moodle-branch : ' master'
13
13
database : ' pgsql'
14
- - php : ' 7.4 '
15
- moodle-branch : ' MOODLE_311_STABLE '
14
+ - php : ' 8.2 '
15
+ moodle-branch : ' MOODLE_403_STABLE '
16
16
database : ' mariadb'
17
+ - php : ' 8.1'
18
+ moodle-branch : ' MOODLE_402_STABLE'
19
+ database : ' pgsql'
17
20
18
21
services :
19
22
postgres :
20
- image : postgres
23
+ image : postgres:14
21
24
env :
22
25
POSTGRES_USER : ' postgres'
23
26
POSTGRES_HOST_AUTH_METHOD : ' trust'
@@ -30,38 +33,39 @@ jobs:
30
33
- 5432:5432
31
34
32
35
mariadb :
33
- image : mariadb
36
+ image : mariadb:10
34
37
env :
35
38
MYSQL_USER : ' root'
36
39
MYSQL_ALLOW_EMPTY_PASSWORD : " true"
40
+ MYSQL_CHARACTER_SET_SERVER : " utf8mb4"
41
+ MYSQL_COLLATION_SERVER : " utf8mb4_unicode_ci"
37
42
ports :
38
43
- 3306:3306
39
44
options : --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3
40
45
41
46
steps :
42
47
- name : Checkout
43
- uses : actions/checkout@v2
48
+ uses : actions/checkout@v3
44
49
with :
45
50
path : plugin
46
51
47
- - name : Setup PHP
52
+ - name : Setup PHP ${{ matrix.php }}
48
53
uses : shivammathur/setup-php@v2
49
54
with :
50
55
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
54
59
55
- - name : Deploy moodle-plugin-ci
60
+ - name : Initialise moodle-plugin-ci
56
61
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
59
63
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
60
64
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
61
- # PHPUnit depends on en_AU.UTF-8 locale
62
65
sudo locale-gen en_AU.UTF-8
66
+ echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
63
67
64
- - name : Install Moodle
68
+ - name : Install moodle-plugin-ci
65
69
run : |
66
70
moodle-plugin-ci add-plugin --branch main moodleou/moodle-editor_ousupsub
67
71
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
@@ -73,38 +77,44 @@ jobs:
73
77
if : ${{ always() }}
74
78
run : moodle-plugin-ci phplint
75
79
76
- - name : phpcpd
80
+ - name : PHP Copy/Paste Detector
81
+ continue-on-error : true # This step will show errors but will not fail.
77
82
if : ${{ always() }}
78
- run : moodle-plugin-ci phpcpd || true
83
+ run : moodle-plugin-ci phpcpd
79
84
80
- - name : phpmd
85
+ - name : PHP Mess Detector
81
86
if : ${{ always() }}
82
87
run : moodle-plugin-ci phpmd
83
88
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.
85
95
if : ${{ always() }}
86
- run : moodle-plugin-ci codechecker
96
+ run : moodle-plugin-ci phpdoc
87
97
88
- - name : validate
98
+ - name : Validating
89
99
if : ${{ always() }}
90
100
run : moodle-plugin-ci validate
91
101
92
- - name : savepoints
102
+ - name : Check upgrade savepoints
93
103
if : ${{ always() }}
94
104
run : moodle-plugin-ci savepoints
95
105
96
- - name : mustache
106
+ - name : Mustache Lint
97
107
if : ${{ always() }}
98
108
run : moodle-plugin-ci mustache
99
109
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
103
113
104
- - name : phpunit
114
+ - name : PHPUnit tests
105
115
if : ${{ always() }}
106
- run : moodle-plugin-ci phpunit
116
+ run : moodle-plugin-ci phpunit --fail-on-warning
107
117
108
- - name : behat
118
+ - name : Behat features
109
119
if : ${{ always() }}
110
120
run : moodle-plugin-ci behat --profile chrome
0 commit comments