-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.24 KB
/
browser-tests.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
name: Browser Tests
on:
schedule:
- cron: '0 0 * * *' # every day at midnight
# Allows manual runs from the Github Actions tab
workflow_dispatch:
jobs:
cypress-run:
runs-on: ubuntu-latest
# Runs in container with chrome, firefox and edge browsers
container: cypress/browsers:node-18.16.0-chrome-113.0.5672.92-1-ff-113.0-edge-113.0.1774.35-1
env:
# prevents Husky from installing git hooks
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v3
# Installs NPM dependencies, caches them correctly and runs all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5
with:
browser: chrome
config: baseUrl=https://test.dancier.net/
# after the test run completes, store videos and any screenshots
# NOTE: screenshots will be generated only if E2E test failed
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos