Skip to content

Commit

Permalink
Update moodle-plugin-ci config
Browse files Browse the repository at this point in the history
  • Loading branch information
timhunt committed Jul 16, 2024
1 parent a4841ba commit 8b9046b
Showing 1 changed file with 32 additions and 23 deletions.
55 changes: 32 additions & 23 deletions .github/workflows/moodle-plugin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,27 @@ jobs:
# - each database at least once
include:
- {php: '7.4', moodle-branch: MOODLE_401_STABLE, database: mariadb}
- {php: '8.0', moodle-branch: MOODLE_402_STABLE, database: pgsql}
- {php: '8.2', moodle-branch: MOODLE_403_STABLE, database: mariadb}
- {php: '8.1', moodle-branch: main, database: pgsql}
- {php: '8.0', moodle-branch: MOODLE_403_STABLE, database: mariadb}
- {php: '8.1', moodle-branch: MOODLE_404_STABLE, database: pgsql}
- {php: '8.2', moodle-branch: main, database: mariadb}

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

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pgsql, mysqli
extensions: ${{ matrix.extensions }}
ini-values: max_input_vars=5000
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 ^4
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
Expand All @@ -71,47 +71,56 @@ jobs:
MOODLE_BRANCH: ${{ matrix.moodle-branch }}

- name: PHP Lint
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci phplint

- name: PHP Copy/Paste Detector
if: ${{ always() }}
continue-on-error: true # This step will show errors but will not fail
run: moodle-plugin-ci phpcpd

- name: PHP Mess Detector
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpmd

- name: Moodle Code Checker
if: ${{ always() }}
run: moodle-plugin-ci codechecker --max-warnings 0
continue-on-error: true # This step will show errors but will not fail
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpcs --max-warnings 0

- name: Moodle PHPDoc Checker
continue-on-error: true # This step will show errors but will not fail
if: ${{ always() }}
run: moodle-plugin-ci phpdoc
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpdoc --max-warnings 0

- name: Validating
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci validate

- name: Check upgrade savepoints
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci savepoints

- name: Mustache Lint
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci mustache

- name: Grunt
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci grunt --max-lint-warnings 0

- name: PHPUnit tests
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpunit

- name: Behat features
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci behat --profile chrome

- name: Upload Behat Faildump
if: ${{ failure() && steps.behat.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: Behat Faildump (${{ join(matrix.*, ', ') }})
path: ${{ github.workspace }}/moodledata/behat_dump
retention-days: 7
if-no-files-found: ignore

- name: Mark cancelled jobs as failed.
if: ${{ cancelled() }}
run: exit 1

0 comments on commit 8b9046b

Please sign in to comment.