Skip to content

Commit de9dc67

Browse files
ogonkovfdintino
authored andcommitted
Add GitHub Workflow for tests. fixes #1333
1 parent aa9e5b9 commit de9dc67

File tree

2 files changed

+42
-12
lines changed

2 files changed

+42
-12
lines changed

.github/workflows/tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
pull_request:
9+
branches:
10+
- master
11+
paths:
12+
- '**/*.js'
13+
- 'package.json'
14+
15+
jobs:
16+
tests:
17+
runs-on: ${{ matrix.os }}
18+
19+
strategy:
20+
matrix:
21+
os: [ubuntu-latest]
22+
node-version: [11.x, 10.x, 8.x]
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
- uses: actions/cache@v2
31+
id: cache-node-modules
32+
with:
33+
path: node_modules
34+
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
35+
restore-keys: |
36+
${{ matrix.os }}-node-${{ matrix.node-version }}-
37+
- run: npm install
38+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
39+
- run: npm test
40+
- name: Report coverage
41+
if: success()
42+
run: codecov/codecov-action@v1

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)