diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e6e9ff..83d7974 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,14 +1,14 @@ -name: Moodle Plugin CI +name: media_jwplayer CI on: [push, pull_request] jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 services: postgres: - image: postgres:9.6 + image: postgres:13 env: POSTGRES_USER: 'postgres' POSTGRES_HOST_AUTH_METHOD: 'trust' @@ -19,20 +19,13 @@ jobs: strategy: fail-fast: false matrix: - include: - - php: '7.4' - moodle-branch: 'master' - database: pgsql - - php: '7.4' - moodle-branch: 'MOODLE_310_STABLE' - database: pgsql - - php: '7.2' - moodle-branch: 'MOODLE_39_STABLE' - database: pgsql + php: ['7.4', '8.0', '8.1'] + moodle-branch: ['MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'master'] + database: 'postgres' steps: - name: Check out repository code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: plugin @@ -40,11 +33,15 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} + extensions: ${{ matrix.extensions }} + ini-values: max_input_vars=5000 + # 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 - 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 @@ -56,10 +53,6 @@ jobs: env: DB: ${{ matrix.database }} MOODLE_BRANCH: ${{ matrix.moodle-branch }} - # Examples or ignore directives: - IGNORE_PATHS: 'ignore' - IGNORE_NAMES: 'ignore_name.php' - MUSTACHE_IGNORE_NAMES: 'broken.mustache' - name: PHP Lint if: ${{ always() }} @@ -77,11 +70,11 @@ jobs: - name: Moodle Code Checker if: ${{ always() }} - run: moodle-plugin-ci codechecker --max-warnings 0 + run: moodle-plugin-ci phpcs --max-warnings 0 - name: Moodle PHPDoc Checker if: ${{ always() }} - run: moodle-plugin-ci phpdoc + run: moodle-plugin-ci phpdoc --max-warnings 0 - name: Validating if: ${{ always() }} @@ -98,3 +91,12 @@ jobs: - name: Grunt if: ${{ always() }} run: moodle-plugin-ci grunt --max-lint-warnings 0 + + - name: PHPUnit tests + if: ${{ always() }} + run: moodle-plugin-ci phpunit --fail-on-warning + + - name: Behat features + if: ${{ always() }} + run: moodle-plugin-ci behat --profile chrome +