-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (43 loc) · 1.65 KB
/
MAIN-phpunit-php8_D9_3x.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
name: PHPUnit
on:
push:
branches:
- 9.x-4.x
env:
DRUPALVER: 9.3.x-dev
jobs:
run-tests:
name: "Drupal 9.3.x-dev (PHP 8.0)"
runs-on: ubuntu-latest
steps:
# Check out the repo
- name: Checkout Repository
uses: actions/checkout@v2
# Here we fully build a docker using the current checked out code
# to ensure we have not broken the install/build process.
- name: Build the Docker
run: |
docker build --tag=tripaldocker:localdocker \
--build-arg drupalversion="$DRUPALVER" \
--build-arg chadoschema='testchado' ./ \
--file tripaldocker/Dockerfile-php8-pgsql13
# Just spin up docker the good ol' fashion way.
- name: Spin up Local Docker
run: |
docker run --publish=80:80 --name=tripaldocker -tid \
--volume=`pwd`:/var/www/drupal9/web/modules/contrib/tripal \
tripaldocker:localdocker
docker exec tripaldocker service postgresql restart
# Runs the PHPUnit tests.
- name: Run PHPUnit Tests
env:
SIMPLETEST_BASE_URL: "http://localhost"
SIMPLETEST_DB: "pgsql://drupaladmin:drupal9developmentonlylocal@localhost/sitedb"
BROWSER_OUTPUT_DIRECTORY: "/var/www/drupal9/web/sites/default/files/simpletest"
run: |
docker exec tripaldocker service postgresql restart
docker exec -e SIMPLETEST_BASE_URL=$SIMPLETEST_BASE_URL \
-e SIMPLETEST_DB=$SIMPLETEST_DB \
-e BROWSER_OUTPUT_DIRECTORY=$BROWSER_OUTPUT_DIRECTORY \
--workdir=/var/www/drupal9/web/modules/contrib/tripal \
tripaldocker phpunit