Skip to content

Commit 27f2259

Browse files
committed
ci: enable GitHub Actions
1 parent e2853d7 commit 27f2259

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/node.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- next
8+
paths:
9+
- '**'
10+
- '!**.md'
11+
pull_request:
12+
branches:
13+
- master
14+
- next
15+
paths:
16+
- '**'
17+
- '!**.md'
18+
19+
jobs:
20+
test:
21+
strategy:
22+
matrix:
23+
node: [10, 12, 14]
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Use Node.js ${{ matrix.node }}
29+
uses: actions/setup-node@v2
30+
with:
31+
node-version: ${{ matrix.node }}
32+
33+
- name: Get yarn cache directory path
34+
id: yarn-cache
35+
run: echo "::set-output name=dir::$(yarn cache dir)"
36+
- name: Cache Dependencies
37+
uses: actions/cache@v2
38+
with:
39+
path: ${{ steps.yarn-cache.outputs.dir }}
40+
key: yarn-${{ hashFiles('**/yarn.lock') }}
41+
restore-keys: |
42+
yarn-
43+
- name: Install Project Dependencies
44+
run: yarn --frozen-lockfile
45+
46+
- name: Test
47+
run: yarn test

0 commit comments

Comments
 (0)