Skip to content

Commit bb3dcfe

Browse files
authored
Add 10.0.x to tests (#269)
* Add 10.0.x to tests * Always add prophecy-phpunit if > 8.9 * Fix PHP7.2/D8.9 version constraint * Bump bluehorndigital/[email protected] * Exclude contrib integration on 10.0.x * Have tests upgrade drupal/core * Use --no-update to reduce Composer time
1 parent 46a78fe commit bb3dcfe

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

.github/workflows/php.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ jobs:
2323
- "^9.0"
2424
include:
2525
- php-version: "7.2"
26-
drupal: "~8.9"
26+
drupal: "^8.9"
2727
experimental: false
2828
- php-version: "8.0"
2929
drupal: "^9.0"
3030
experimental: true
31+
- php-version: "8.0"
32+
drupal: "10.0.x-dev"
33+
experimental: true
3134
steps:
3235
- name: "Checkout"
3336
uses: "actions/checkout@v2"
@@ -38,14 +41,17 @@ jobs:
3841
php-version: "${{ matrix.php-version }}"
3942
tools: composer:v2
4043
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, gd
41-
- name: "Install dependencies"
42-
run: "composer update --no-progress --prefer-dist"
4344
- name: "Downgrade dev dependencies"
44-
run: "composer require phpunit/phpunit:6.5.14 drush/drush:~9 drupal/core-recommended:${{ matrix.drupal }} drupal/core-dev:${{ matrix.drupal }} --with-all-dependencies --dev"
45+
run: "composer require phpunit/phpunit:6.5.14 drush/drush:~9 drupal/core-recommended:${{ matrix.drupal }} drupal/core-dev:${{ matrix.drupal }} --with-all-dependencies --dev --no-update"
4546
if: ${{ matrix.drupal == '^8.9' }}
47+
- name: "Upgrade to drupal/core:10.0.x"
48+
run: "composer require drupal/core-recommended:${{ matrix.drupal }} drupal/core-dev:${{ matrix.drupal }} --with-all-dependencies --dev --no-update"
49+
if: ${{ matrix.drupal == '10.0.x-dev' }}
4650
- name: "Add phpspec/prophecy-phpunit"
47-
run: "composer require --dev phpspec/prophecy-phpunit:^2"
48-
if: ${{ matrix.drupal == '^9.0' }}
51+
run: "composer require phpspec/prophecy-phpunit:^2 --dev --no-update"
52+
if: ${{ matrix.drupal != '^8.9' }}
53+
- name: "Install dependencies"
54+
run: "composer update --no-progress --prefer-dist"
4955
- name: "PHPCS"
5056
run: "php vendor/bin/phpcs src"
5157
- name: "PHPStan"
@@ -68,11 +74,14 @@ jobs:
6874
- "^9.0"
6975
include:
7076
- php-version: "7.2"
71-
drupal: "~8.9"
77+
drupal: "^8.9"
7278
experimental: false
7379
- php-version: "8.0"
7480
drupal: "^9.0"
7581
experimental: true
82+
- php-version: "8.0"
83+
drupal: "10.0.x-dev"
84+
experimental: true
7685
steps:
7786
- name: "Checkout"
7887
uses: "actions/checkout@v2"
@@ -84,7 +93,7 @@ jobs:
8493
tools: composer:v2
8594
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv
8695
- name: Setup Drupal
87-
uses: bluehorndigital/[email protected].1
96+
uses: bluehorndigital/[email protected].3
8897
with:
8998
version: ${{ matrix.drupal }}
9099
path: ~/drupal
@@ -110,12 +119,14 @@ jobs:
110119
cd ~/drupal
111120
./vendor/bin/phpstan analyze web/core/modules/migrate_drupal --no-progress | grep -q "tests/fixtures" && false || true
112121
- name: 'Check "Cannot redeclare token_theme() due to blazy_test.module"'
122+
if: ${{ matrix.drupal != '10.0.x-dev' }}
113123
run: |
114124
cd ~/drupal
115125
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/token drupal/blazy
116126
./vendor/bin/phpstan analyze web/modules/contrib/blazy --no-progress || if (($? == 255)); then false; else true; fi
117127
COMPOSER_MEMORY_LIMIT=-1 composer remove drupal/token drupal/blazy
118128
- name: 'Check "Cannot redeclare video_embed_media_media_bundle_insert()"'
129+
if: ${{ matrix.drupal != '10.0.x-dev' }}
119130
run: |
120131
cd ~/drupal
121132
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/video_embed_field drupal/slick
@@ -133,6 +144,10 @@ jobs:
133144
drupal:
134145
- "^8.9"
135146
- "^9.0"
147+
include:
148+
- php-version: "8.0"
149+
drupal: "10.0.x-dev"
150+
experimental: true
136151
steps:
137152
- name: "Checkout"
138153
uses: "actions/checkout@v2"
@@ -144,7 +159,7 @@ jobs:
144159
tools: composer:v2
145160
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv
146161
- name: Setup Drupal
147-
uses: bluehorndigital/[email protected].1
162+
uses: bluehorndigital/[email protected].3
148163
with:
149164
version: ${{ matrix.drupal }}
150165
path: ~/drupal

0 commit comments

Comments
 (0)