forked from focus-trap/focus-trap-react
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.47 KB
/
ci.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
name: CI
on:
push:
branches:
- 'master'
pull_request:
jobs:
test:
name: Lint & Test
runs-on: ubuntu-latest
env:
CI: true
strategy:
matrix:
node: [12, 14]
steps:
- uses: actions/checkout@master
- name: Setup environment
id: setups
run: |-
echo "::set-output name=yarn_cache::$(yarn cache dir)"
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.setups.outputs.yarn_cache }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-node-${{ matrix.node }}
- name: Install packages
run: yarn --frozen-lockfile
- name: Lint
run: |-
yarn format:check;
yarn lint;
- name: Test
run: |-
yarn test:unit;
yarn test:types;
- name: Build # Tests to see if a build can succeed
run: yarn build
e2e:
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chrome, firefox]
container:
image: cypress/included:6.0.1
options: --user 1001
env:
CYPRESS_BROWSER: ${{ matrix.browser }}
steps:
- uses: actions/checkout@v1
- uses: cypress-io/[email protected]
with:
start: yarn start
browser: ${{ matrix.browser }}