diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9145af..a236b51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,13 +30,37 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1'] - moodle-branch: ['MOODLE_401_STABLE'] - database: [pgsql, mariadb] + include: + - php: '8.1' + # Main job. Run all checks that do not require setup and only need to be run once. + runchecks: 'all' + moodle-branch: 'MOODLE_401_STABLE' + database: 'pgsql' + - php: '7.4' + moodle-branch: 'MOODLE_401_STABLE' + database: 'mariadb' + - php: '8.2' + moodle-branch: 'MOODLE_402_STABLE' + database: 'mariadb' + - php: '8.0' + moodle-branch: 'MOODLE_402_STABLE' + database: 'pgsql' + - php: '8.2' + moodle-branch: 'MOODLE_403_STABLE' + database: 'pgsql' + - php: '8.0' + moodle-branch: 'MOODLE_403_STABLE' + database: 'mariadb' + - php: '8.3' + moodle-branch: 'MOODLE_404_STABLE' + database: 'mariadb' + - php: '8.1' + moodle-branch: 'MOODLE_404_STABLE' + database: 'pgsql' steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: plugin @@ -45,7 +69,7 @@ jobs: with: php-version: ${{ matrix.php }} extensions: ${{ matrix.extensions }} - ini-values: max_input_vars=5000 + ini-values: max_input_vars=6000 # 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 @@ -67,51 +91,43 @@ jobs: # MOODLE_APP: 'true' - name: PHP Lint - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci phplint - - name: PHP Copy/Paste Detector - continue-on-error: true # This step will show errors but will not fail - 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: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci phpmd - name: Moodle Code Checker - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci phpcs --max-warnings 0 - name: Moodle PHPDoc Checker - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci phpdoc --max-warnings 0 - name: Validating - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci validate - name: Check upgrade savepoints - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci savepoints - name: Mustache Lint - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci mustache - name: Grunt - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci grunt --max-lint-warnings 0 - name: PHPUnit tests - if: ${{ !cancelled() }} + if: ${{ always() }} run: moodle-plugin-ci phpunit --fail-on-warning - name: Behat features - if: ${{ !cancelled() }} - run: moodle-plugin-ci behat --profile chrome - - - name: Mark cancelled jobs as failed. - if: ${{ cancelled() }} - run: exit 1 + id: behat + if: ${{ always() }} + run: moodle-plugin-ci behat --profile chrome \ No newline at end of file