-
Notifications
You must be signed in to change notification settings - Fork 44
76 lines (73 loc) · 3.55 KB
/
cypress-release-test.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
66
67
68
69
70
71
72
73
74
75
76
name: Cypress release tests
on:
push:
branches: [develop, dependabot/**, '*test*']
jobs:
# vercel will redeploy the develop/staging app on creating a PR to main
# wait for new deployment to complete before running tests
wait-for-vercel-deployment:
name: Wait for vercel deployment
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelDeployment.outputs.url }}
steps:
- name: Wait for Vercel preview deployment to be ready
uses: patrickedqvist/wait-for-vercel-preview@v1.3.2
id: waitForVercelDeployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 1000
check_interval: 5
cypress-run:
name: Cypress e2e tests
needs: wait-for-vercel-deployment
runs-on: ubuntu-latest
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving Cypress Cloud hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 3 copies of the current job in parallel
# this will automatically load balance
containers: [1, 2, 3]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run cypress
uses: cypress-io/github-action@v6.7.6
with:
browser: chrome
config-file: cypress.config.ts
headed: false
record: true # send results to cypress dashboard
parallel: true
env:
NEXT_PUBLIC_ROLLBAR_ENV: CI
NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA: ci
NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_FIREBASE_API_KEY: ${{ secrets.NEXT_PUBLIC_FIREBASE_API_KEY }}
NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN: ${{ secrets.NEXT_PUBLIC_ROLLBAR_CLIENT_TOKEN }}
NEXT_PUBLIC_STORYBLOK_TOKEN: ${{ secrets.NEXT_PUBLIC_STORYBLOK_TOKEN }}
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ secrets.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }}
NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_PROJECT_ID }}
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ secrets.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }}
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID}}
NEXT_PUBLIC_FIREBASE_APP_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_APP_ID }}
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID }}
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_BASE_URL: ${{ needs.wait-for-vercel-deployment.outputs.preview_url }}
CYPRESS_MAIL_SLURP_API_KEY: ${{secrets.CYPRESS_MAIL_SLURP_API_KEY}}
CYPRESS_INBOX_ID: ${{secrets.CYPRESS_INBOX_ID}}
CYPRESS_SUPER_ADMIN_EMAIL: ${{secrets.CYPRESS_SUPER_ADMIN_EMAIL}}
CYPRESS_SUPER_ADMIN_PASSWORD: ${{secrets.CYPRESS_SUPER_ADMIN_PASSWORD}}
CYPRESS_BUMBLE_PARTNER_ADMIN_EMAIL: ${{secrets.CYPRESS_BUMBLE_ADMIN_EMAIL}}
CYPRESS_BUMBLE_PARTNER_ADMIN_PASSWORD: ${{secrets.CYPRESS_BUMBLE_ADMIN_PASSWORD}}
CYPRESS_BADOO_PARTNER_ADMIN_EMAIL: ${{secrets.CYPRESS_BADOO_ADMIN_EMAIL}}
CYPRESS_BADOO_PARTNER_ADMIN_PASSWORD: ${{secrets.CYPRESS_BADOO_ADMIN_PASSWORD}}
CYPRESS_PUBLIC_EMAIL: ${{secrets.CYPRESS_PUBLIC_EMAIL}}
CYPRESS_PUBLIC_PASSWORD: ${{secrets.CYPRESS_PUBLIC_PASSWORD}}
CYPRESS_PUBLIC_NAME: ${{secrets.CYPRESS_PUBLIC_NAME}}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}