forked from breatheco-de/admin
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.69 KB
/
Copy pathcypress.yml
File metadata and controls
58 lines (49 loc) · 1.69 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
name: Cypress Test
on:
push: {}
pull_request:
branches:
- master
- development
jobs:
cypress-test:
name: Test with Server
runs-on: ubuntu-latest
strategy:
matrix:
# node-version: [17.x, 16.x] # Latest, long term support
node-version: [16.x] # long term support
# browser: [chrome, firefox] # this is disabled because problems like the bug with Date.jsx
browser: [electron]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cypress dependencies
run: |
sudo apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 \
libxss1 libasound2 libxtst6 xauth xvfb
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
# ${{ runner.os }}-build-${{ env.cache-name }}-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# is based in package-lock.json, it prevents run this test with other dependencies versions
- name: Install packages
run: npm ci
- name: Production server
run: |
yarn build
yarn serve -l 3000 & # detach serve
# the original action maintained by cypress is generating bad executions of code (case Date.jsx)
- name: Cypress tests
run: |
yarn wait-port 3000
yarn cy:run --browser ${{ matrix.browser }}