-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.43 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
48
49
50
51
52
53
54
55
56
name: End-to-end tests
on:
workflow_run:
workflows: ["Main"]
types:
- completed
branch:
- main
jobs:
e2e:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: Staging
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --version
- name: Install
run: yarn --immutable
- name: Run cypress tests
run: yarn workspace @zerologementvacant/e2e start
env:
CYPRESS_API: ${{ vars.API_HOST }}
CYPRESS_BASE_URL: ${{ vars.HOST }}
CYPRESS_EMAIL: ${{ secrets.CYPRESS_EMAIL }}
CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }}
CYPRESS_MAILER_HOST: ${{ vars.CYPRESS_MAILER_HOST }}
CYPRESS_MAILER_USER: ${{ secrets.CYPRESS_MAILER_USER }}
CYPRESS_MAILER_PASSWORD: ${{ secrets.CYPRESS_MAILER_PASSWORD }}
- name: Upload screenshots
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: e2e/cypress/screenshots
retention-days: 7