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