-
Notifications
You must be signed in to change notification settings - Fork 3
123 lines (113 loc) · 4.67 KB
/
cypress-mail.yml
File metadata and controls
123 lines (113 loc) · 4.67 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: End-to-end tests for contact form (runs every monday)
on:
schedule:
- cron: "0 0 * * 1" #runs every monday
# push:
# branches:
# - master
jobs:
cypress-run-chrome-io:
runs-on: ubuntu-latest
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
# Also see warning here https://github.com/cypress-io/github-action#parallel
# strategy:
# fail-fast: false # https://github.com/cypress-io/github-action/issues/48
# matrix:
# containers: [1, 2] # Uses 2 parallel instances
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
build: yarn build
start: yarn start
wait-on: "http://localhost:3000" # Waits for above
spec: ./cypress/e2e/ContactForm.cy.ts
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
# parallel: true # Runs test in parallel using settings above
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEXT_PUBLIC_DOMAIN: io
cypress-run-chrome-ch:
runs-on: ubuntu-latest
# Runs tests in parallel with matrix strategy https://docs.cypress.io/guides/guides/parallelization
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
# Also see warning here https://github.com/cypress-io/github-action#parallel
# strategy:
# fail-fast: false # https://github.com/cypress-io/github-action/issues/48
# matrix:
# containers: [1, 2] # Uses 2 parallel instances
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
build: yarn build
start: yarn start
wait-on: "http://localhost:3000" # Waits for above
spec: ./cypress/e2e/ContactForm.cy.ts
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
# parallel: true # Runs test in parallel using settings above
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEXT_PUBLIC_DOMAIN: ch
# cypress-run-firefox:
# runs-on: ubuntu-latest
# container:
# image: cypress/browsers:node16.18.0-chrome107-ff106-edge
# options: --user 1001
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# # Install NPM dependencies, cache them correctly
# # and run all Cypress tests
# - name: Cypress run
# uses: cypress-io/github-action@v5
# with:
# start: yarn start
# browser: firefox
# # Edge test is unstable
# cypress-run-edge:
# runs-on: ubuntu-latest
# container:
# image: cypress/browsers:node16.18.0-chrome107-ff106-edge
# options: --user 1001
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Cypress run
# uses: cypress-io/github-action@v5
# with:
# start: yarn start
# browser: edge