Skip to content

Commit

Permalink
Add GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ogonkov committed Jun 13, 2020
1 parent b1bfb55 commit cf783e9
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
tests:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [windows-latest, ubuntu-latest]
node-version: [8.9.x, 12.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: actions/cache@v1
id: cache-node-modules
with:
path: node_modules
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ matrix.os }}-node-${{ matrix.node-version }}-
- run: npm install
if: steps.cache-node-modules.outputs.cache-hit != 'true'
- run: npm test -- --coverage
env:
CI: true
- name: Report coverage
if: success()
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./test/.coverage/lcov.info

0 comments on commit cf783e9

Please sign in to comment.