-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (73 loc) · 2.15 KB
/
e2e.yaml
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
name: Cypress e3e
on:
push
jobs:
e2e:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:latest
env:
MARIADB_ROOT_PASSWORD: root_password
MARIADB_DATABASE: test_db
MARIADB_USER: test_user
MARIADB_PASSWORD: test_password
options: >-
--health-cmd="healthcheck.sh --connect --innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=3
--name mariadb
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Composer install
uses: kohlerdominik/docker-run-action@v1
with:
image: composer
shell: /bin/bash
workdir: /app
volumes:
${{ github.workspace }}:/app
run: |
composer install --ignore-platform-reqs
cp .github/workflows/assets/local.settings.php ./web/sites/default/local.settings.php
- name: Drupal install
uses: kohlerdominik/docker-run-action@v1
with:
image: bitnami/php-fpm:8.2
shell: /bin/bash
workdir: /app
volumes:
${{ github.workspace }}:/app
run: |
vendor/bin/drush si minimal --existing-config -y
vendor/bin/drush pm:install fs_content default_content --yes
- name: Run PHP server
uses: kohlerdominik/docker-run-action@v1
with:
image: bitnami/php-fpm:8.2
shell: /bin/bash
workdir: /app
options: |
--name=php
--detach
volumes:
${{ github.workspace }}:/app
run: |
vendor/bin/drush --root=web runserver php:8888
- name: Build cypress and run e2e tests
uses: kohlerdominik/docker-run-action@v1
with:
image: cypress/base:latest
shell: /bin/bash
workdir: /app
volumes:
${{ github.workspace }}/cypress:/app
run: |
cd /app
npm ci
npx cypress install
npx cypress run --config baseUrl=http://php:8888