From e2c7758c243cca0f96f4c103df65dc0ca46114fa Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Thu, 24 Oct 2024 17:36:45 +0530 Subject: [PATCH] Workflow updates for Drupal 11 upgrade --- .github/workflows/php.yml | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index d3174614..e113719a 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -32,16 +32,18 @@ jobs: fail-fast: false matrix: php-version: - - "8.1" - "8.2" - "8.3" drupal-core: # Should update the following as the minimum supported version from Drupal.org - - "10.2.x" - "10.3.x" + - "11.0.x" instance-type: - "Edge" - "X" + exclude: + - php-version: "8.2" + drupal-core: "11.0.x" steps: @@ -95,6 +97,7 @@ jobs: composer config --no-plugins allow-plugins.cweagans/composer-patches true composer config --no-plugins allow-plugins.php-http/discovery true composer config minimum-stability dev + composer require 'drupal/rules:^4.0' composer require wikimedia/composer-merge-plugin composer config --json extra.merge-plugin.require '["modules/contrib/apigee_edge/composer.json"]' composer config platform.php ${{ matrix.php-version }} @@ -104,20 +107,6 @@ jobs: composer require --dev drupal/classy:^1.0 composer config --no-plugins allow-plugins.drupal/console-extend-plugin true - - name: "Allow plugins and dev dependencies for Drupal 10.2" - if: ${{ matrix.drupal-core == '10.2.x' }} - run: | - cd drupal - composer require 'drupal/rules:3.x-dev@dev' - composer update --with-all-dependencies - - - name: "Allow plugins and dev dependencies for Drupal 10.3" - if: ${{ matrix.drupal-core == '10.3.x' }} - run: | - cd drupal - composer require 'drupal/rules:^4.0' - composer update --with-all-dependencies - # Install drupal using minimal installation profile and enable the module. - name: Install Drupal run: | @@ -138,8 +127,7 @@ jobs: echo "APIGEE_EDGE_ENDPOINT=$APIGEE_EDGE_HYBRID_ENDPOINT" >> $GITHUB_ENV composer show > composer-show.txt - - name: "Drupal check for Drupal 10.2" - if: ${{ matrix.drupal-core == '10.2.x' }} + - name: "Drupal check" run: | cd drupal vendor/bin/drupal-check modules/contrib/apigee_edge @@ -152,13 +140,13 @@ jobs: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional - name: "Run PHPUnit tests" - if: ${{ matrix.drupal-core != '10.2.x' || matrix.php-version != '8.2' }} + if: ${{ matrix.drupal-core != '10.3.x' || matrix.php-version != '8.3' }} run: | cd drupal vendor/bin/phpunit -c core --verbose --color --group apigee_edge --testsuite unit,kernel,functional,functional-javascript modules/contrib/apigee_edge - name: "Run PHPUnit tests with Code Coverage" - if: ${{ matrix.drupal-core == '10.2.x' && matrix.php-version == '8.2' }} + if: ${{ matrix.drupal-core == '10.3.x' && matrix.php-version == '8.3' }} run: | cd drupal cp modules/contrib/apigee_edge/phpunit.core.xml.dist core/phpunit.xml @@ -172,7 +160,7 @@ jobs: path: drupal/sites/simpletest/browser_output/* - name: Upload coverage to Codecov - if: ${{ matrix.drupal-core == '10.2.x' && matrix.php-version == '8.2' }} + if: ${{ matrix.drupal-core == '10.3.x' && matrix.php-version == '8.3' }} uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }}