From 9add08248165ff911c2841f2983394305e25864e Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Mon, 22 Apr 2024 21:35:59 +0100 Subject: [PATCH] Prepare plugin CI for Moodle 4.4. --- .github/workflows/moodle-ci.yml | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index 8a8787c..a671a38 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -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 @@ -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