Skip to content

Commit 8595f72

Browse files
committed
chore: import Action script
1 parent 4322e74 commit 8595f72

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
tags-ignore:
8+
- '**'
9+
paths-ignore:
10+
- '*.md'
11+
12+
pull_request:
13+
branches:
14+
- master
15+
paths-ignore:
16+
- '*.md'
17+
18+
jobs:
19+
test:
20+
name: Node.js v${{ matrix.nodejs }}
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
nodejs: [8, 10, 12, 14]
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: actions/setup-node@v1
28+
with:
29+
node-version: ${{ matrix.nodejs }}
30+
31+
- name: (cache) restore
32+
uses: actions/cache@master
33+
with:
34+
path: node_modules
35+
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
36+
37+
- name: Install
38+
run: npm install
39+
40+
- name: (coverage) Install
41+
if: matrix.nodejs >= 14
42+
run: npm install -g c8
43+
44+
- name: Test
45+
run: npm test
46+
if: matrix.nodejs < 14
47+
48+
- name: (coverage) Test
49+
run: c8 --include=lib npm test
50+
if: matrix.nodejs >= 14
51+
52+
- name: (coverage) Report
53+
if: matrix.nodejs >= 14
54+
run: |
55+
c8 report --reporter=text-lcov > coverage.lcov
56+
bash <(curl -s https://codecov.io/bash)
57+
env:
58+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)