-
Notifications
You must be signed in to change notification settings - Fork 72
65 lines (55 loc) · 1.63 KB
/
cypress_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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Cypress E2E Tests
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches:
- "main"
- "release-**"
env:
CI: true
env:
# Docker auth with read-only permissions.
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_RO_TOKEN: ${{ secrets.DOCKER_RO_TOKEN }}
jobs:
Cypress-E2E:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Nox
run: pip install nox>=2022
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USER }}
password: ${{ env.DOCKER_RO_TOKEN }}
- name: Start test environment in the background
run: nox -s "fides_env(test)" -- keep_alive
- name: Install dependencies
run: |
cd clients/cypress-e2e
npm install
- name: Cypress E2E tests
uses: cypress-io/github-action@v6
with:
working-directory: clients/cypress-e2e
install: false
wait-on: "http://localhost:8080, http://localhost:3001"
record: true
env:
# pass the Cypress Cloud record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Teardown
run: nox -s teardown