Skip to content

Commit a1d537c

Browse files
committed
Re-formatted CI and added more PHP versions to the test matrix.
1 parent 7fab10d commit a1d537c

File tree

1 file changed

+25
-35
lines changed

1 file changed

+25
-35
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 35 deletions
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
@@ -12,20 +15,15 @@ env:
1215

1316
jobs:
1417
build:
15-
runs-on: ubuntu-latest
18+
runs-on: 'ubuntu-20.04'
1619
strategy:
1720
fail-fast: false
21+
1822
matrix:
1923
php-versions: ['8.3']
20-
drupal-release: ['alpha']
21-
composer-channel: ['stable']
22-
include:
23-
- php-versions: '8.3'
24-
drupal-release: dev
25-
composer-channel: stable
26-
- php-versions: '8.3'
27-
drupal-release: alpha
28-
composer-channel: snapshot
24+
drupal-release: ['alpha', 'dev']
25+
composer-channel: ['stable', 'snapshot']
26+
2927
steps:
3028
- name: Dump matrix context
3129
env:
@@ -35,25 +33,16 @@ jobs:
3533
- name: Checkout
3634
uses: actions/checkout@v2
3735

38-
- name: Upgrade sqlite3
39-
run: |
40-
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
41-
tar -xzf /tmp/sqlite.tar.gz -C /tmp
42-
cd /tmp/sqlite-autoconf-3450300
43-
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
44-
make && sudo make install
45-
sudo ldconfig
46-
4736
- name: Setup PHP
4837
uses: shivammathur/setup-php@v2
4938
with:
5039
php-version: ${{ matrix.php-versions }}
51-
extensions: gd, sqlite, pdo_sqlite
40+
extensions: gd, pdo_sqlite
5241

53-
- name: Update composer
42+
- name: Update Composer
5443
run: composer --verbose self-update --${{ matrix.composer-channel }}
5544

56-
- name: Dump composer version
45+
- name: Show Composer version
5746
run: composer --version
5847

5948
- name: Validate composer.json
@@ -62,19 +51,20 @@ jobs:
6251
- name: Install dependencies
6352
run: composer --verbose install
6453

65-
- if: matrix.drupal-release == 'dev'
66-
run: composer --verbose require --no-update drupal/core-recommended:11.0.x-dev && composer --verbose require --no-update --dev drupal/core-dev:11.0.x-dev
67-
68-
- if: matrix.drupal-release == 'dev'
69-
run: composer --verbose update
70-
71-
- run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
54+
- name: Override Drupal version to dev for testing dev releases
55+
if: matrix.drupal-release == 'dev'
56+
run: |
57+
composer --verbose require --no-update drupal/core-recommended:11.0.x-dev
58+
composer --verbose require --no-update --dev drupal/core-dev:11.0.x-dev
59+
composer --verbose update
7260
73-
- run: ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
61+
- name: Install site
62+
run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
7463

75-
- run: until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
64+
- name: Start server
65+
run: |
66+
./vendor/bin/drush runserver "$SIMPLETEST_BASE_URL" &
67+
until curl -s "$SIMPLETEST_BASE_URL"; do true; done > /dev/null
7668
77-
- name: Run a single unit test to verify the testing setup.
69+
- name: Run a single unit test to verify the testing setup
7870
run: ./vendor/bin/phpunit -c ./web/core $(pwd)/web/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php
79-
80-
- run: ./vendor/bin/drush

0 commit comments

Comments
 (0)