Skip to content

Commit 8b1e658

Browse files
committed
add github actions
1 parent f1b5e2d commit 8b1e658

1 file changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: 16.x
20+
- id: yarn-cache-dir-path
21+
run: echo "::set-output name=dir::$(yarn cache dir)"
22+
- uses: actions/cache@v1
23+
with:
24+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
25+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
26+
restore-keys: ${{ runner.os }}-yarn-
27+
- run: yarn --frozen-lockfile
28+
- uses: actions/cache@v1
29+
with:
30+
path: .eslintcache
31+
key: lint-${{ env.GITHUB_SHA }}
32+
restore-keys: lint-
33+
- run: yarn lint
34+
test:
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
os: [ubuntu-latest, windows-latest, macos-latest]
39+
node-version: [10.x, 12.x, 14.x, 16.x]
40+
polling: ["false", "200"]
41+
exclude:
42+
- os: macos-latest
43+
node-version: 10.x
44+
polling: "200"
45+
- os: macos-latest
46+
node-version: 12.x
47+
polling: "200"
48+
- os: macos-latest
49+
node-version: 14.x
50+
polling: "200"
51+
- os: macos-latest
52+
node-version: 16.x
53+
polling: "200"
54+
runs-on: ${{ matrix.os }}
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: Use Node.js ${{ matrix.node-version }}
58+
uses: actions/setup-node@v1
59+
with:
60+
node-version: ${{ matrix.node-version }}
61+
- id: yarn-cache-dir-path
62+
run: echo "::set-output name=dir::$(yarn cache dir)"
63+
- uses: actions/cache@v1
64+
with:
65+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
66+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
67+
restore-keys: ${{ runner.os }}-yarn-
68+
- run: yarn --frozen-lockfile
69+
- run: yarn cover --report lcovonly
70+
env:
71+
WATCHPACK_POLLING: ${{ matrix.polling }}
72+
- uses: codecov/codecov-action@v1
73+
with:
74+
flags: integration
75+
functionalities: gcov

0 commit comments

Comments
 (0)