-
Notifications
You must be signed in to change notification settings - Fork 23
53 lines (53 loc) · 2.19 KB
/
run-cypress.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
name: run cypress
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
# run at 6 hour UTC
schedule:
- cron: "0 6 * * *"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
continue-on-error: true
strategy:
matrix:
php: [php72]
env:
PROD_PHP: php72
DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-${{matrix.php}}.yml
steps:
- name: Checkout
uses: actions/checkout@master
- name: chown some dirs
run: |
mkdir tmp vendor && sudo chown -R 33 app/ theme/ web/ tmp/ vendor/
- name: Build Docker environmnent
if: always()
run: |
cd docker &&
${DOCKER_COMPOSE} up -d --build &&
docker compose exec -T --user www-data php-fpm.vm.openconext.org bash -c '
SYMFONY_ENV=ci composer install --prefer-dist -n -o --ignore-platform-reqs && \
./app/console cache:clear --env=ci && \
cd theme && CYPRESS_INSTALL_BINARY=0 yarn install --frozen-lockfile && EB_THEME=skeune yarn build
'
- name: Run Cypress integration tests
if: always()
run: |
cd docker && \
docker compose exec -T --user www-data php-fpm.vm.openconext.org bash -c '
EB_THEME=skeune ./theme/scripts/prepare-test.js
' && \
docker compose exec -T cypress bash -c '
cd e2e && yarn install && cypress run --spec cypress/integration/skeune/**/*.spec.js,cypress/integration/shared/*.spec.js --browser=chrome --headless
' && \
docker compose exec -T --user www-data php-fpm.vm.openconext.org bash -c '
EB_THEME=openconext ./theme/scripts/prepare-test.js
' && \
docker compose exec -T cypress bash -c '
cd e2e && cypress run --spec cypress/integration/openconext/**/*.spec.js --browser=chrome --headless
'