-
Notifications
You must be signed in to change notification settings - Fork 32
48 lines (39 loc) · 1.35 KB
/
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
name: End-to-end tests
on: push
env:
# a list of apps to build and publish on releases
APP_NAMES: datahub-e2e,metadata-editor-e2e
jobs:
cypress-run:
name: Cypress test
runs-on: ubuntu-latest
container:
image: cypress/browsers:node18.12.0-chrome107
steps:
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Cache Cypress binary
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-cypress-${{ hashFiles('**/package-lock.json') }}
- name: Build the backend
run: docker compose up -f support-services/docker-compose.yml -d
- name: Test backend
run: docker run --network container:webapp-frontend appropriate/curl -s --retry 10 --retry-connrefused http://localhost:8080/
- name: install dependencies and verify Cypress
env:
# make sure every Cypress install prints minimal information
CI: 1
run: |
cat support-services/.env
npm ci
npx cypress verify
npx cypress info
npx cypress version
- name: Cypress tests
run: npx nx run-many --projects=${{ env.APP_NAMES }} --target=e2e