-
Notifications
You must be signed in to change notification settings - Fork 186
62 lines (51 loc) · 1.55 KB
/
cypress-tests.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
56
57
58
59
60
61
62
name: E2E Tests
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- edge
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and start Docker containers
run: |
docker compose -f docker-compose.yml -f docker-compose.test.yml --env-file test.env --profile postgres up -d --build
- name: Health Check the Server http response
uses: jtalk/url-health-check-action@v4
with:
url: http://localhost/api/v3/testConnection
max-attempts: 10
retry-delay: 10s
- name: Cypress Run
uses: cypress-io/github-action@v6
with:
config: baseUrl=http://localhost
spec: cypress/e2e/!(third-party)/**/*.cy.js
working-directory: e2e
- name: Upload Cypress screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: e2e/cypress/screenshots
- name: Upload Cypress videos
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: e2e/cypress/videos
- name: Stop Docker containers
if: always()
run: docker compose -f docker-compose.yml -f docker-compose.test.yml --env-file test.env --profile postgres down