-
Notifications
You must be signed in to change notification settings - Fork 14
43 lines (39 loc) · 1.24 KB
/
E2ETests.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
name: End-to-end tests
on:
pull_request:
jobs:
cypress-run:
runs-on: ubuntu-20.04
strategy:
matrix:
# run n copies of the current job in parallel
node: [18]
steps:
- name: Waiting for 200 from the Vercel Preview
uses: patrickedqvist/[email protected]
id: previewUrl
with:
token: ${{ secrets.GITHUB_TOKEN }}
check_interval: 5
max_timeout: 220
- name: Checkout
uses: actions/checkout@v3
with:
repository: 'vegaprotocol/vega-website-cypress-tests'
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
wait-on: ${{steps.previewUrl.outputs.url}}
config: baseUrl="${{steps.previewUrl.outputs.url}}"
env:
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'Upload failure screenshots'
if: failure()
uses: actions/upload-artifact@v3
with:
path: cypress/screenshots/
retention-days: 2