-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (61 loc) · 2.09 KB
/
github-actions.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
name: End-to-end tests
on: [push]
jobs:
build-lint-unit-test:
runs-on: ubuntu-20.04 # pin ubuntu for no snapshot variance
env:
FORCE_COLOR: true # force colored output from yarn
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
# cache: 'yarn' // uncomment after adding yarn.lock
- name: Install dependencies
run: yarn
- name: Run Build
run: yarn build
- name: Run lint
run: yarn lint
- name: Run unit tests
run: yarn test
integ-tests:
runs-on: ubuntu-20.04 # pin ubuntu for no snapshot variance
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: Install dependencies
run: yarn
- name: cypress run
uses: cypress-io/github-action@v2
with:
start: yarn start
wait-on: 'http://localhost:3333'
command: yarn test:cypress --env updateSnapshots=true
working-directory: packages/synchro-charts
# after the test run completes
# store videos and any screenshots
- uses: actions/upload-artifact@v1
if: always()
with:
name: cypress-screenshots
path: packages/synchro-charts/cypress/screenshots
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-videos
path: packages/synchro-charts/cypress/videos
- uses: actions/upload-artifact@v1
if: always()
with:
name: cypress-snapshots
path: packages/synchro-charts/cypress/snapshots