diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index 32aac80..8fad8a7 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -4,11 +4,11 @@ on: [push, pull_request] jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 services: postgres: - image: postgres:12.7 + image: postgres:13 env: POSTGRES_USER: 'postgres' POSTGRES_HOST_AUTH_METHOD: 'trust' @@ -16,10 +16,12 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 mariadb: - image: mariadb:10.5 + image: mariadb:10 env: MYSQL_USER: 'root' MYSQL_ALLOW_EMPTY_PASSWORD: "true" + MYSQL_CHARACTER_SET_SERVER: "utf8mb4" + MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci" ports: - 3306:3306 options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3 @@ -27,26 +29,13 @@ jobs: strategy: fail-fast: false matrix: - include: - - php: '8.0' - moodle-branch: 'master' - database: 'pgsql' - - php: '7.4' - moodle-branch: 'master' - database: 'mariadb' - - php: '7.4' - moodle-branch: 'MOODLE_311_STABLE' - database: 'pgsql' - - php: '7.4' - moodle-branch: 'MOODLE_310_STABLE' - database: 'pgsql' - - php: '7.3' - moodle-branch: 'MOODLE_39_STABLE' - database: 'mariadb' + php: ['8.0'] + moodle-branch: ['MOODLE_401_STABLE'] + database: [mariadb] steps: - name: Check out repository code - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: plugin @@ -54,7 +43,8 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - ini-values: max_input_vars=6000 + extensions: ${{ matrix.extensions }} + ini-values: max_input_vars=5000 coverage: none - name: Initialise moodle-plugin-ci @@ -63,6 +53,7 @@ jobs: echo $(cd ci/bin; pwd) >> $GITHUB_PATH echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH sudo locale-gen en_AU.UTF-8 + echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV - name: Install moodle-plugin-ci run: | @@ -76,16 +67,18 @@ jobs: 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() }} run: moodle-plugin-ci phpcpd - name: PHP Mess Detector + continue-on-error: true # This step will show errors but will not fail if: ${{ always() }} run: moodle-plugin-ci phpmd - name: Moodle Code Checker if: ${{ always() }} - run: moodle-plugin-ci codechecker --max-warnings 0 + run: moodle-plugin-ci codechecker --max-warnings 0 - name: Moodle PHPDoc Checker if: ${{ always() }} @@ -101,16 +94,16 @@ jobs: - name: Mustache Lint if: ${{ always() }} - run: moodle-plugin-ci mustache + run: moodle-plugin-ci mustache || true - name: Grunt if: ${{ always() }} - run: moodle-plugin-ci grunt + run: moodle-plugin-ci grunt --max-lint-warnings 0 - name: PHPUnit tests if: ${{ always() }} - run: moodle-plugin-ci phpunit + run: moodle-plugin-ci phpunit --fail-on-warning - name: Behat features if: ${{ always() }} - run: moodle-plugin-ci behat --profile chrome + run: moodle-plugin-ci behat --profile chrome --auto-rerun 0 \ No newline at end of file