Skip to content

Commit

Permalink
Workflow updates for Drupal 11 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire committed Oct 24, 2024
1 parent 1e480cf commit e2c7758
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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 }}
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}
Expand Down

0 comments on commit e2c7758

Please sign in to comment.