-
-
Notifications
You must be signed in to change notification settings - Fork 130
51 lines (51 loc) · 1.93 KB
/
test_e2e.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
name: Test E2E
on: push
env:
APP_ENV: test
NODE_ENV: test
jobs:
E2E:
name: Run end to end tests with cypress
runs-on: ubuntu-latest
env:
GEOCODE_EARTH_API_KEY: ${{ secrets.GEOCODE_EARTH_API_KEY }}
STRIPE_PUBLISHABLE_KEY: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
STRIPE_CONNECT_CLIENT_ID: ${{ secrets.STRIPE_CONNECT_CLIENT_ID }}
AWS_ENDPOINT: ${{ secrets.AWS_ENDPOINT }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Set timezone
uses: szenius/[email protected]
with:
timezoneLinux: "Europe/Paris"
- uses: actions/checkout@v2
- name: Run CoopCycle Web
uses: ./.github/actions/run-coopcycle-web
timeout-minutes: 5
- name: Setup CoopCycle
run: docker compose exec -T php bin/console coopcycle:setup --env=test
- name: Run Cypress
uses: cypress-io/github-action@v6
with:
# Maybe we could run a build step before starting tests
# https://symfony.com/doc/current/frontend/encore/installation.html
# https://github.com/cypress-io/github-action?tab=readme-ov-file#build-app
# build: npm run dev
spec: |
cypress/e2e/**/*.cy.js
# after the test run completes store videos and any screenshots
- name: Upload images for failed tests
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
- name: Show Symfony warnings on failure
if: failure()
uses: ./.github/actions/show-symfony-warnings
- name: Upload Symfony logs on failure
if: failure()
uses: ./.github/actions/upload-symfony-logs