From 3eeced6cac0aa7f115085e6d5b8c4eba717862bb Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 15 Mar 2024 18:37:47 +0100 Subject: [PATCH] Update GHA own tests - Switch to pcov for coverage - Remove php <= 8.0. - Remove phpcpd --- .github/workflows/test.yml | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4cb2d09c..767c2b23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,13 +11,11 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - - name: Setup PHP 7.4 + - name: Setup PHP 8.1 uses: shivammathur/setup-php@v2 with: - php-version: 7.4 - # We want to verify that xdebug works for coverage. Once we only support - # Moodle 3.10/PHPUnit 8 and up, we can switch our tests to pcov too. - coverage: xdebug + php-version: 8.1 + coverage: pcov - name: Initialise run: make init @@ -34,13 +32,11 @@ jobs: - name: Check out repository code uses: actions/checkout@v4 - - name: Setup PHP 7.4 + - name: Setup PHP 8.1 uses: shivammathur/setup-php@v2 with: - php-version: 7.4 - # We want to verify that xdebug works for coverage. Once we only support - # Moodle 3.10/PHPUnit 8 and up, we can switch our tests to pcov too. - coverage: xdebug + php-version: 8.1 + coverage: pcov - name: Initialise run: make init @@ -83,12 +79,6 @@ jobs: moodle-branch: 'MOODLE_402_STABLE' - php: '8.1' moodle-branch: 'MOODLE_401_STABLE' - - php: '8.0' - moodle-branch: 'MOODLE_400_STABLE' - - php: '8.0' - moodle-branch: 'MOODLE_311_STABLE' - - php: '7.4' - moodle-branch: 'MOODLE_39_STABLE' steps: - name: Check out repository code @@ -131,7 +121,6 @@ jobs: MOODLE_BRANCH: ${{ matrix.moodle-branch }} run: | moodle-plugin-ci phplint - moodle-plugin-ci phpcpd moodle-plugin-ci phpmd moodle-plugin-ci phpcs moodle-plugin-ci phpcbf @@ -140,7 +129,7 @@ jobs: moodle-plugin-ci mustache moodle-plugin-ci grunt || [[ "$MOODLE_BRANCH" =~ MOODLE_3[0-9]+_STABLE ]] # Fixtures only compatible with Moodle >= 4.0 moodle-plugin-ci phpdoc - moodle-plugin-ci phpunit --verbose --coverage-text --fail-on-warning + moodle-plugin-ci phpunit --coverage-text --fail-on-warning moodle-plugin-ci behat --profile default moodle-plugin-ci behat --profile chrome moodle-plugin-ci behat --profile firefox --tags="@local_ci&&~@app" @@ -196,12 +185,10 @@ jobs: moodle-branch: 'main' - php: '8.2' moodle-branch: 'MOODLE_403_STABLE' - - php: '8.1' + - php: '8.2' moodle-branch: 'MOODLE_402_STABLE' - - php: '8.0' + - php: '8.1' moodle-branch: 'MOODLE_401_STABLE' - - php: '7.4' - moodle-branch: 'MOODLE_400_STABLE' steps: - name: Check out repository code @@ -248,7 +235,6 @@ jobs: MOODLE_BRANCH: ${{ matrix.moodle-branch }} run: | php build/moodle-plugin-ci.phar phplint - php build/moodle-plugin-ci.phar phpcpd php build/moodle-plugin-ci.phar phpmd php build/moodle-plugin-ci.phar phpcs php build/moodle-plugin-ci.phar phpcbf @@ -257,7 +243,7 @@ jobs: php build/moodle-plugin-ci.phar mustache php build/moodle-plugin-ci.phar grunt php build/moodle-plugin-ci.phar phpdoc - php build/moodle-plugin-ci.phar phpunit --verbose --coverage-text --fail-on-warning + php build/moodle-plugin-ci.phar phpunit --coverage-text --fail-on-warning php build/moodle-plugin-ci.phar behat --profile default php build/moodle-plugin-ci.phar behat --profile chrome php build/moodle-plugin-ci.phar behat --profile firefox --tags="@local_ci&&~@app" @@ -276,8 +262,6 @@ jobs: - php: '8.3' - php: '8.2' - php: '8.1' - - php: '8.0' - - php: '7.4' steps: - name: Setup PHP ${{ matrix.php }}