Skip to content

Commit

Permalink
Prepare plugin CI for Moodle 4.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Apr 22, 2024
1 parent acf653e commit 9add082
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ jobs:
moodle-branch: 'MOODLE_402_STABLE'
- php: '8.1'
moodle-branch: 'MOODLE_403_STABLE'
- php: '8.2'
moodle-branch: 'MOODLE_404_STABLE'

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

Expand All @@ -56,24 +58,37 @@ jobs:
echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV
- name: Install moodle-plugin-ci
run: |
moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1
env:
DB: pgsql
MOODLE_BRANCH: ${{ matrix.moodle-branch }}

- name: Code checker
if: ${{ always() }}
if: ${{ !cancelled() }}
run: moodle-plugin-ci phpcs --max-warnings 0

- 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 --fail-on-warning --coverage-text

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

- name: Behat failures
if: ${{ failure() && steps.behat.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: Behat failures (${{ 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 9add082

Please sign in to comment.