-
Notifications
You must be signed in to change notification settings - Fork 21
180 lines (172 loc) · 4.71 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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: E2E
on: pull_request
# START PLAYWRIGHT SPECIFIC CONFIG
jobs:
prepare_app:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.31.2-focal
steps:
- uses: actions/checkout@master
- name: Copy envs
run: cp .env.dist .env
- name: Install root dependencies
run: npm ci
- name: Build ci
run: npm run build:ci
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: build
path: build
e2e_chrome:
needs: prepare_app
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.31.2-focal
defaults:
run:
working-directory: e2e-playwright
steps:
- uses: actions/checkout@master
- name: Download build
uses: actions/download-artifact@v3
with:
name: build
path: build
- name: Copy e2e envs
run: cp .env.dist .env
- name: Install e2e dependencies
run: npm install
- name: Run build and tests
run: npm run test:chrome
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: e2e-chrome-artifacts
path: |
e2e-playwright/test-report/
e2e-playwright/test-results/
retention-days: 30
e2e_firefox:
needs: prepare_app
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.31.2-focal
options: --user 1001
defaults:
run:
working-directory: e2e-playwright
steps:
- uses: actions/checkout@master
- name: Download build
uses: actions/download-artifact@v3
with:
name: build
path: build
- name: Copy e2e envs
run: cp .env.dist .env
- name: Install e2e dependencies
run: npm install
- name: Run build and tests
run: npm run test:firefox
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: e2e-firefox-artifacts
path: |
e2e-playwright/test-report/
e2e-playwright/test-results/
retention-days: 30
e2e_safari:
needs: prepare_app
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.31.2-focal
defaults:
run:
working-directory: e2e-playwright
steps:
- uses: actions/checkout@master
- name: Download build
uses: actions/download-artifact@v3
with:
name: build
path: build
- name: Copy e2e envs
run: cp .env.dist .env
- name: Install e2e dependencies
run: npm install
- name: Run build and tests
run: npm run test:safari
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: e2e-safari-artifacts
path: |
e2e-playwright/test-report/
e2e-playwright/test-results/
retention-days: 30
# END PLAYWRIGHT SPECIFIC CONFIG
# START CYPRESS SPECIFIC CONFIG
# jobs:
# prepare_app:
# runs-on: ubuntu-latest
# container:
# image: cypress/included:10.11.0
# options: --user 1001
# steps:
# - uses: actions/checkout@master
# - name: Copy envs
# run: cp .env.dist .env
# - name: Install root dependencies
# uses: bahmutov/npm-install@v1
# - name: Build ci
# run: npm run build:ci
# - name: Upload build
# uses: actions/upload-artifact@v1
# with:
# name: build
# path: build
# cypress_chrome:
# needs: prepare_app
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: Copy e2e envs
# run: cp .env.e2e.dist ./e2e/.env
# - name: Download build
# uses: actions/download-artifact@v1
# with:
# name: build
# - name: Install npm
# run: npm install
# - name: Install Cypress and run tests
# uses: cypress-io/github-action@v4
# with:
# working-directory: e2e
# start: npx http-server ../build --port 1337
# wait-on: 'http://localhost:1337'
# browser: chrome
# cypress_firefox:
# needs: prepare_app
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: Copy e2e envs
# run: cp .env.e2e.dist ./e2e/.env
# - name: Download build
# uses: actions/download-artifact@v1
# with:
# name: build
# - name: Install Cypress and run tests
# uses: cypress-io/github-action@v4
# with:
# working-directory: e2e
# start: npx http-server ../build --port 1337
# wait-on: 'http://localhost:1337'
# browser: firefox
# END CYPRESS SPECIFIC CONFIG