-
Notifications
You must be signed in to change notification settings - Fork 221
77 lines (62 loc) · 2.28 KB
/
pull-request.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
name: Pull Request
on: pull_request
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Required to retrieve git history
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Get Cypress Version
id: cypress-version
run: echo "::set-output name=version::$(node utils/get-cypress-version.js)"
- name: Cache Cypress
id: cypress-cache
uses: actions/cache/@v1
with:
path: .cache/cypress
key: ${{ runner.os }}-cypress-cache-version-${{ steps.cypress-version.outputs.version }}
- name: Cache node modules
id: yarn-cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-node-modules-hash-${{ hashFiles('yarn.lock') }}
- name: Install Packages
if:
steps.yarn-cache.outputs.cache-hit != 'true' || steps.cypress-cache.outputs.cache-hit !=
'true'
run: yarn install --production=false
env:
CYPRESS_CACHE_FOLDER: .cache/cypress
# Keep steps separate for Github Actions annotation matching: https://github.com/actions/setup-node/blob/83c9f7a7df54d6b57455f7c57ac414f2ae5fb8de/src/setup-node.ts#L26-L33
- name: Lint
run: yarn lint
- name: Dependency Check
run: yarn depcheck
- name: Type Check
run: yarn typecheck
- name: Unit tests
run: yarn test
- name: Build Storybook
run: yarn build-storybook --quiet
- name: Start Server
run: npx http-server docs -p 9001 & npx wait-on http://localhost:9001
- uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
appCode: dlpro96xybh
storybookBuildDir: docs
exitOnceUploaded: true
exitZeroOnChanges: true
- name: Integration tests
run: yarn cypress run --record
env:
# Github Actions doesn't support encryption on forks
# If these keys become compromised, we will rotate and disable these features
# on forked PRs until a suitable workaround is found
CYPRESS_RECORD_KEY: 3a9347b6-36ab-4a36-823d-709f4078b148
CYPRESS_CACHE_FOLDER: .cache/cypress