-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (99 loc) · 3.49 KB
/
build.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: 0 0 * * *
jobs:
install:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [7.4, 7.3]
os: [ubuntu-latest]
name: site:install - ${{ matrix.php }}
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: db
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
chromedriver:
image: drupalci/webdriver-chromedriver:production
ports:
- 9515
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.composer/cache/files
~/.composer/cache/repo
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, soap, intl, gd, exif, iconv
coverage: none
tools: composer:v1
- name: Validate composer.json
run: composer validate
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Install Drupal CiviCRM
run: ./vendor/bin/drush site:install --account-pass=admin --db-url=mysql://root:@127.0.0.1:${{ job.services.mysql.ports[3306] }}/db --yes
phpunit:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php: [7.3]
os: [ubuntu-latest]
experimental: [false]
include:
- php: 7.4
os: ubuntu-latest
experimental: true
name: phpunit - ${{ matrix.php }}
services:
chromedriver:
image: drupalci/webdriver-chromedriver:production
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: db
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.composer/cache/files
~/.composer/cache/repo
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, soap, intl, gd, exif, iconv
coverage: none
tools: composer:v1
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run php built-in server
run: php -S 127.0.0.1:8080 -t web &
- name: PHPUnit ${{ matrix.module }}
run: ./vendor/bin/phpunit web/profiles/drupal_civicrm/${{ matrix.module}}
env:
SYMFONY_DEPRECATIONS_HELPER: weak
SIMPLETEST_DB: mysql://root:@127.0.0.1:${{ job.services.mysql.ports[3306] }}/db
SIMPLETEST_BASE_URL: http://127.0.0.1:8080
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox"]}}, "http://127.0.0.1:${{ job.services.chromedriver.ports[9515] }}"]'