Skip to content

Commit

Permalink
chore: import Action script
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed Sep 8, 2020
1 parent 4322e74 commit 8595f72
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CI

on:
push:
branches:
- '**'
tags-ignore:
- '**'
paths-ignore:
- '*.md'

pull_request:
branches:
- master
paths-ignore:
- '*.md'

jobs:
test:
name: Node.js v${{ matrix.nodejs }}
runs-on: ubuntu-latest
strategy:
matrix:
nodejs: [8, 10, 12, 14]
steps:
- uses: actions/checkout@v2
- 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 >= 14
run: npm install -g c8

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

- name: (coverage) Test
run: c8 --include=lib npm test
if: matrix.nodejs >= 14

- name: (coverage) Report
if: matrix.nodejs >= 14
run: |
c8 report --reporter=text-lcov > coverage.lcov
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 8595f72

Please sign in to comment.