Skip to content

Commit 11fed1c

Browse files
authored
Switch to Github Actions (drupal-composer#595)
1 parent eacd055 commit 11fed1c

File tree

3 files changed

+76
-44
lines changed

3 files changed

+76
-44
lines changed

.github/workflows/ci.yml

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
env:
6+
COMPOSER_MEMORY_LIMIT: -1
7+
SIMPLETEST_DB: sqlite://tmp/site.sqlite
8+
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"
9+
10+
jobs:
11+
build:
12+
runs-on: 'ubuntu-20.04'
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
php-versions: ['7.3', '7.4', '8.0']
17+
drupal-release: ['stable']
18+
composer-channel: ['stable']
19+
include:
20+
- php-versions: '8.0'
21+
drupal-release: dev
22+
composer-channel: stable
23+
- php-versions: '8.0'
24+
drupal-release: stable
25+
composer-channel: snapshot
26+
steps:
27+
- name: Dump matrix context
28+
env:
29+
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
30+
run: echo "$MATRIX_CONTEXT"
31+
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
35+
- name: Setup PHP
36+
uses: shivammathur/setup-php@v2
37+
with:
38+
php-version: ${{ matrix.php-versions }}
39+
extensions: gd, pdo_sqlite
40+
41+
- name: Update composer
42+
run: composer --verbose self-update --${{ matrix.composer-channel }}
43+
44+
- name: Dump composer verson
45+
run: composer --version
46+
47+
- name: Validate composer.json
48+
run: composer --verbose validate
49+
50+
- name: Install dependencies
51+
run: composer --verbose install
52+
53+
- if: matrix.drupal-release == 'dev'
54+
run: composer --verbose require --no-update drupal/core-recommended:9.2.x-dev && composer --verbose require --no-update --dev drupal/core-dev:9.2.x-dev
55+
56+
- if: matrix.drupal-release == 'dev'
57+
run: composer --verbose update
58+
59+
- run: ./vendor/bin/drush site-install --verbose --yes --db-url=sqlite://tmp/site.sqlite
60+
61+
- run: ./vendor/bin/drush runserver $SIMPLETEST_BASE_URL &
62+
63+
- run: until curl -s $SIMPLETEST_BASE_URL; do true; done > /dev/null
64+
65+
# https://www.drupal.org/project/drupal/issues/3182653
66+
# https://www.drupal.org/node/3176567
67+
- if: ${{ matrix.php-versions == '7.4' }} || ${{ matrix.php-versions == '8.0' }}
68+
run: composer require phpspec/prophecy-phpunit:^2
69+
70+
- name: Run a single unit test to verfiy the testing setup.
71+
run: ./vendor/bin/phpunit -c ./web/core ./web/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php
72+
73+
- run: ./vendor/bin/drush

.travis.yml

-41
This file was deleted.

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
"php": ">=7.3",
2020
"composer/installers": "^1.9",
2121
"cweagans/composer-patches": "^1.7",
22-
"drupal/core-composer-scaffold": "^9.0",
23-
"drupal/core-recommended": "^9.0",
22+
"drupal/core-composer-scaffold": "^9.1",
23+
"drupal/core-recommended": "^9.1",
2424
"drush/drush": "^10.3",
2525
"vlucas/phpdotenv": "^5.1",
2626
"webflo/drupal-finder": "^1.2"
2727
},
2828
"require-dev": {
29-
"drupal/core-dev": "^9.0",
29+
"drupal/core-dev": "^9.1",
3030
"zaporylie/composer-drupal-optimizations": "^1.2"
3131
},
3232
"conflict": {

0 commit comments

Comments
 (0)