Skip to content

Commit

Permalink
Merge 139324a into b1bfb55
Browse files Browse the repository at this point in the history
  • Loading branch information
ogonkov committed Jun 13, 2020
2 parents b1bfb55 + 139324a commit 488557a
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 11 deletions.
8 changes: 5 additions & 3 deletions .eslintrc.json → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
const isWindows = process.platform === 'win32';

module.exports = {
"env": {
"es6": true,
"node": true
Expand All @@ -18,7 +20,7 @@
],
"linebreak-style": [
"error",
"unix"
isWindows ? "windows" : "unix"
],
"quotes": [
"error",
Expand All @@ -39,4 +41,4 @@
}
}
]
}
};
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
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"node": ">= 8.9.0"
},
"scripts": {
"pretest": "rm -rf test/.coverage && eslint src",
"lint": "eslint src",
"pretest": "rm -rf test/.coverage && npm run lint",
"test": "jest",
"build": "rm -rf es && babel src --out-dir=es",
"preversion": "npm test",
Expand Down

0 comments on commit 488557a

Please sign in to comment.