forked from focus-trap/tabbable
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (68 loc) · 1.83 KB
/
ci.yml
File metadata and controls
77 lines (68 loc) · 1.83 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
push:
branches:
- 'master'
pull_request:
jobs:
test:
name: Check lint/types/unit-test/build
runs-on: ubuntu-latest
env:
CI: true
strategy:
matrix:
node: [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:types;
yarn test:unit;
- name: Build # Tests to see if a build can succeed
run: yarn build
E2E:
runs-on: ubuntu-latest
name: e2e
strategy:
matrix:
browser: [chrome, firefox]
timeout-minutes: 20
container:
image: cypress/included:9.6.0
options: --user 1001 --shm-size=2g # @see https://github.com/cypress-io/github-action/issues/104#issuecomment-666047965
env:
CYPRESS_BROWSER: ${{ matrix.browser }}
steps:
- uses: actions/checkout@v2
- name: Test E2E
uses: cypress-io/github-action@v2.6.1
with:
browser: ${{ matrix.browser }}
env: coverage=true
- name: Install code coverage
run: |-
yarn global add codecov;
echo "$(yarn global bin)" >> $GITHUB_PATH;
- name: Code coverage
run: codecov;