diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1300fc0..5db4822 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: services: postgres: - image: postgres:12 + image: postgres:13 env: POSTGRES_USER: 'postgres' POSTGRES_HOST_AUTH_METHOD: 'trust' @@ -28,16 +28,24 @@ jobs: fail-fast: false matrix: include: - # Highest php versions supported by each branch (with master always being tested twice). - - php: 8.0 - moodle-branch: master + # Highest php versions supported by each branch (with main always being tested twice). + - php: 8.2 + moodle-branch: main database: pgsql - - php: 8.0 - moodle-branch: master + - php: 8.2 + moodle-branch: main database: mariadb - - php: 8.0 + - php: 8.2 + moodle-branch: MOODLE_403_STABLE + database: pgsql + - php: 8.2 + moodle-branch: MOODLE_402_STABLE + database: pgsql + + - php: 8.1 moodle-branch: MOODLE_401_STABLE database: pgsql + - php: 8.0 moodle-branch: MOODLE_400_STABLE database: pgsql @@ -58,29 +66,22 @@ jobs: moodle-branch: MOODLE_39_STABLE database: pgsql - # Lowest php versions supported by each branch (with master always being tested twice). - - php: 7.4 - moodle-branch: master + # Lowest php versions supported by each branch (with main always being tested twice). + - php: 8.1 + moodle-branch: main database: pgsql - - php: 7.4 - moodle-branch: master + - php: 8.1 + moodle-branch: main database: mariadb - - php: 7.4 - moodle-branch: MOODLE_401_STABLE - database: pgsql - - - php: 7.3 - moodle-branch: MOODLE_400_STABLE + - php: 8.0 + moodle-branch: MOODLE_403_STABLE database: pgsql - - php: 7.3 - moodle-branch: MOODLE_311_STABLE + - php: 8.0 + moodle-branch: MOODLE_402_STABLE database: pgsql - - php: 7.2 - moodle-branch: MOODLE_310_STABLE - database: pgsql - - php: 7.2 - moodle-branch: MOODLE_39_STABLE + - php: 7.4 + moodle-branch: MOODLE_401_STABLE database: pgsql steps: - name: Check out repository code @@ -113,47 +114,52 @@ jobs: IGNORE_PATHS: tests/fixtures - name: PHP Lint - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci phplint - name: PHP Copy/Paste Detector continue-on-error: true # This step will show errors but will not fail - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci phpcpd - name: PHP Mess Detector continue-on-error: true # This step will show errors but will not fail - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci phpmd - name: Moodle Code Checker - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci codechecker --max-warnings 0 - name: Moodle PHPDoc Checker - if: ${{ always() }} - run: moodle-plugin-ci phpdoc + if: ${{ !cancelled() }} + run: | + moodle-plugin-ci phpdoc - 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() }} - # run: moodle-plugin-ci phpunit + - name: PHPUnit tests + if: ${{ !cancelled() }} + run: moodle-plugin-ci phpunit - name: Behat features - if: ${{ always() }} + if: ${{ !cancelled() }} run: moodle-plugin-ci behat --profile chrome + + - name: Mark cancelled jobs as failed. + if: ${{ cancelled() }} + run: exit 1 diff --git a/README.md b/README.md index bc20ad1..a3b37ff 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Migrate mod_hvp to mod_h5pactivity # -![Moodle Plugin CI](https://github.com/moodlehq/moodle-tool_migratehvp2h5p/workflows/Run%20all%20tests/badge.svg) +[![Moodle Plugin CI](https://github.com/moodlehq/moodle-tool_migratehvp2h5p/actions/workflows/ci.yml/badge.svg)](https://github.com/moodlehq/moodle-tool_migratehvp2h5p/actions/workflows/ci.yml) + Moodle plugin allowing to migrate activities created with the mod_hvp plugin created by Joubel to the new mod_h5pactivity created by Moodle HQ since Moodle 3.9.