forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (50 loc) · 1.87 KB
/
docker.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
name: Docker Based Pipeline
on:
push:
jobs:
docker-compose:
name: Excute Tests on Docker Compose
runs-on: ubuntu-latest
env:
COMPOSE_FILE: docker-compose.test.yml
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run PHPUnit, PHPSpec and Behat tests
run: docker-compose run ci
docker:
name: Excute Tests on Docker Containers
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Shutdown default MySQL
run: sudo service mysql stop
-
name: Setup MySQL
run: |
docker network create sylius_network
docker run \
--platform linux/amd64 \
-e MYSQL_ALLOW_EMPTY_PASSWORD=true \
-p 3306:3306/tcp \
--name mysql \
--net sylius_network \
-d mysql:5.7
-
name: Run PHPUnit, PHPSpec and Behat tests
run: |
docker run \
-v "$(pwd)"/:/app:delegated \
-v "$(pwd)"/.docker/test/php.ini:/etc/php/8.0/fpm/php.ini:delegated \
-v "$(pwd)"/.docker/test/php.ini:/etc/php/8.0/cli/php.ini:delegated \
-e DATABASE_URL="mysql://root@mysql/sylius_test" \
-e APP_ENV="test" \
-e PHP_DATE_TIMEZONE="Europe/Warsaw" \
--net sylius_network \
--entrypoint="" \
-p 80:80/tcp \
-i sylius/standard:1.11-traditional \
make ci