forked from City-of-Helsinki/drupal-helfi-strategia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.yml.dist
37 lines (31 loc) · 1.01 KB
/
test.yml.dist
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
on: [push]
name: CI
env:
SIMPLETEST_DB: "mysql://drupal:drupal@db:3306/drupal"
SIMPLETEST_BASE_URL: "http://127.0.0.1:8080"
SYMFONY_DEPRECATIONS_HELPER: max[direct]=0
jobs:
tests:
runs-on: ubuntu-latest
container:
image: ghcr.io/city-of-helsinki/drupal-php-docker:8.0
services:
db:
image: druidfi/db:mysql5.7-drupal
ports:
- 3306:3306
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Build project
run: composer install
- name: Run PHPCS
run: vendor/bin/phpcs public/modules/custom/ --standard=Drupal
- name: Install Drupal
run: php -d sendmail_path=$(which true); drush --yes -v site-install --existing-config --db-url="$SIMPLETEST_DB"
- name: Run PHPUnit tests
run: |
drush runserver $SIMPLETEST_BASE_URL > /dev/null 2>&1 &
chromedriver --port=4444 > /dev/null 2>&1 &
vendor/bin/phpunit -c $GITHUB_WORKSPACE/phpunit.xml.dist --verbose