Skip to content

Commit

Permalink
Code checker updates (Moodle 3.x) WIP 2
Browse files Browse the repository at this point in the history
  • Loading branch information
james-cnz committed Sep 30, 2023
1 parent a90dd05 commit fc710dd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:

services:
postgres:
image: postgres:10 # Moodle 3.4-3.5: 9.3-11.x / Moodle 3.6-3.8: 9.4-11.x / Moodle 3.9: >=9.5 / Moodle 3.10-3.11: >=9.6
image: postgres:9.6 # Moodle 3.4-3.5: 9.3-11.x / Moodle 3.6-3.8: 9.4-11.x / Moodle 3.9: >=9.5 / Moodle 3.10-3.11: >=9.6
env:
POSTGRES_USER: 'postgres'
POSTGRES_HOST_AUTH_METHOD: 'trust'
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
mariadb:
image: mariadb:10.5 # Moodle 3.4-3.8: >=5.5.31 / Moodle 3.9-3.11 >=10.2.29 / 10.6 breaks Moodle, see MDL-72131
image: mariadb:10.2 # Moodle 3.4-3.8: >=5.5.31 / Moodle 3.9-3.11 >=10.2.29 / 10.6 breaks Moodle, see MDL-72131
env:
MYSQL_USER: 'root'
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Expand All @@ -35,41 +35,49 @@ jobs:
matrix:
include:
# Moodle 3.4 (old) version.php $plugin -> requires = 2017111300
#- php: '7.0' # 7.0-7.2
# moodle-branch: 'MOODLE_34_STABLE'
# database: mariadb
- php: '7.0' # 7.0-7.2
moodle-branch: 'MOODLE_34_STABLE'
database: mariadb
plugin-ci: ^3
# Moodle 3.5
- php: '7.0' # 7.0-7.2
moodle-branch: 'MOODLE_35_STABLE'
database: pgsql
plugin-ci: ^3
# Moodle 3.6
- php: '7.0' # 7.0-7.3
moodle-branch: 'MOODLE_36_STABLE'
database: mariadb
plugin-ci: ^3
# Moodle 3.7
- php: '7.1' # 7.1-7.3
moodle-branch: 'MOODLE_37_STABLE'
database: pgsql
plugin-ci: ^3
# Moodle 3.8
- php: '7.2' # 7.1-7.4
moodle-branch: 'MOODLE_38_STABLE'
database: mariadb
plugin-ci: ^3
# Moodle 3.9
- php: '7.3' # 7.2-7.4
moodle-branch: 'MOODLE_39_STABLE'
database: pgsql
plugin-ci: ^3
# Moodle 3.10
- php: '7.4' # 7.2-7.4
moodle-branch: 'MOODLE_310_STABLE'
database: mariadb
plugin-ci: ^4
# Moodle 3.11
- php: '8.0' # 7.3-8.0
moodle-branch: 'MOODLE_311_STABLE'
database: pgsql
plugin-ci: ^4

steps:
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: plugin

Expand All @@ -79,11 +87,13 @@ jobs:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }} # PHP 8 changes
ini-values: max_input_vars=5000
# If you are not using code coverage, keep "none". Otherwise, use "pcov" (Moodle 3.10 and up) or "xdebug".
# If you try to use code coverage with "none", it will fallback to phpdbg (which has known problems).
coverage: none

- name: Initialise moodle-plugin-ci
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ${{ matrix.plugin-ci }}
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
Expand Down Expand Up @@ -112,7 +122,7 @@ jobs:

- name: Moodle Code Checker
if: ${{ always() }}
run: moodle-plugin-ci codechecker --max-warnings 0
run: moodle-plugin-ci phpcs --max-warnings 0

- name: Moodle PHPDoc Checker
if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
defined('MOODLE_INTERNAL') || die();

$plugin->version = 2022053002; // The current plugin version (Date: YYYYMMDDXX).
$plugin->requires = 2018051700; // Requires this Moodle version.
$plugin->requires = 2017111300; // Requires this Moodle version.
$plugin->component = 'format_multitopic'; // Full name of the plugin (used for diagnostics). // CHANGED: format name.
$plugin->maturity = MATURITY_STABLE;
$plugin->release = 'v3.2.2';

0 comments on commit fc710dd

Please sign in to comment.