Skip to content

Commit 248fc3d

Browse files
committedFeb 18, 2021
chore: replace travis w/ github actions
1 parent 56b9c4f commit 248fc3d

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed
 

‎.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: lukeed

‎.github/workflows/ci.yml

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

‎.travis.yml

-3
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.