Skip to content

Commit

Permalink
chore: replace travis w/ github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Feb 18, 2021
1 parent 56b9c4f commit 248fc3d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: lukeed
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on: [push, pull_request]

jobs:
test:
name: Node.js v${{ matrix.nodejs }}
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [8, 10, 12]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.nodejs }}

- name: (cache) restore
uses: actions/cache@master
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Install
run: npm install

- name: (coverage) Install
if: matrix.nodejs >= 12
run: npm install -g nyc

- name: Test
run: npm test
if: matrix.nodejs < 12

- name: (coverage) Test
run: nyc --include=src npm test
if: matrix.nodejs >= 12

- name: (coverage) Report
if: matrix.nodejs >= 12
run: |
nyc report --reporter=text-lcov > coverage.lcov
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

0 comments on commit 248fc3d

Please sign in to comment.