Skip to content

Commit c3397b9

Browse files
committedMay 14, 2024·
Re-formatted CI and added more PHP versions to the test matrix.
1 parent c94f893 commit c3397b9

File tree

1 file changed

+36
-28
lines changed

1 file changed

+36
-28
lines changed
 

‎.github/workflows/ci.yml

+36-28
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ name: CI
33
on:
44
push:
55
pull_request:
6-
types: [opened, synchronize, reopened]
6+
types:
7+
- opened
8+
- synchronize
9+
- reopened
710

811
env:
912
COMPOSER_MEMORY_LIMIT: -1
@@ -15,17 +18,21 @@ jobs:
1518
runs-on: 'ubuntu-20.04'
1619
strategy:
1720
fail-fast: false
21+
1822
matrix:
19-
php-versions: ['8.1']
20-
drupal-release: ['stable']
21-
composer-channel: ['stable']
23+
php-versions: ['8.1', '8.2']
24+
drupal-release: ['stable', 'dev']
25+
composer-channel: ['stable', 'snapshot']
26+
# Drupal 10.x-dev tests fail on PHP 8.3.
27+
# @see https://www.drupal.org/project/drupal/issues/3375693
2228
include:
23-
- php-versions: '8.1'
24-
drupal-release: dev
25-
composer-channel: stable
26-
- php-versions: '8.1'
27-
drupal-release: stable
28-
composer-channel: snapshot
29+
- php-versions: '8.3'
30+
drupal-release: 'stable'
31+
composer-channel: 'stable'
32+
- php-versions: '8.3'
33+
drupal-release: 'stable'
34+
composer-channel: 'snapshot'
35+
2936
steps:
3037
- name: Dump matrix context
3138
env:
@@ -41,10 +48,10 @@ jobs:
4148
php-version: ${{ matrix.php-versions }}
4249
extensions: gd, pdo_sqlite
4350

44-
- name: Update composer
51+
- name: Update Composer
4552
run: composer --verbose self-update --${{ matrix.composer-channel }}
4653

47-
- name: Dump composer version
54+
- name: Show Composer version
4855
run: composer --version
4956

5057
- name: Validate composer.json
@@ -53,24 +60,25 @@ jobs:
5360
- name: Install dependencies
5461
run: composer --verbose install
5562

56-
- if: matrix.drupal-release == 'dev'
57-
run: composer --verbose require --no-update drupal/core-recommended:10.0.x-dev && composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev
58-
59-
- if: matrix.drupal-release == 'dev'
60-
run: composer --verbose update
63+
# @see https://www.drupal.org/node/3176567
64+
- name: Install testing dependency
65+
if: ${{ matrix.php-versions == '8.1' }}
66+
run: composer require --dev phpspec/prophecy-phpunit:^2
6167

62-
- run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
68+
- name: Override Drupal version to dev for testing dev releases
69+
if: matrix.drupal-release == 'dev'
70+
run: |
71+
composer --verbose require --no-update drupal/core-recommended:10.0.x-dev
72+
composer --verbose require --no-update --dev drupal/core-dev:10.0.x-dev
73+
composer --verbose update
6374
64-
- run: ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
75+
- name: Install site
76+
run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
6577

66-
- run: until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
78+
- name: Start server
79+
run: |
80+
./vendor/bin/drush runserver "$SIMPLETEST_BASE_URL" &
81+
until curl -s "$SIMPLETEST_BASE_URL"; do true; done > /dev/null
6782
68-
# https://www.drupal.org/project/drupal/issues/3182653
69-
# https://www.drupal.org/node/3176567
70-
- if: ${{ matrix.php-versions == '8.1' }}
71-
run: composer require phpspec/prophecy-phpunit:^2
72-
73-
- name: Run a single unit test to verify the testing setup.
83+
- name: Run a single unit test to verify the testing setup
7484
run: ./vendor/bin/phpunit -c ./web/core ./web/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php
75-
76-
- run: ./vendor/bin/drush

0 commit comments

Comments
 (0)