Skip to content

Commit

Permalink
Fixed CI and added license checker
Browse files Browse the repository at this point in the history
  • Loading branch information
gnought committed Jan 29, 2020
1 parent e532b2e commit 71a6264
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 9 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: ci

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x, 10.x, 12.x, 13.x]

steps:
- uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: |
npm install
- name: Check licenses
run: |
npm run license-checker
- name: Run tests
run: |
npm run test:ci
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel: true

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# aedes-stats
[![Build Status](https://travis-ci.org/mcollina/aedes-stats.svg?branch=master)](https://travis-ci.org/mcollina/aedes-stats)
![](https://github.com/moscajs/aedes-stats/workflows/ci/badge.svg)
[![Dependencies Status](https://david-dm.org/mcollina/aedes-stats/status.svg)](https://david-dm.org/mcollina/aedes-stats)
[![devDependencies Status](https://david-dm.org/mcollina/aedes-stats/dev-status.svg)](https://david-dm.org/mcollina/aedes-stats?type=dev)
<br/>
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
"main": "stats.js",
"scripts": {
"lint": "standard --verbose | snazzy",
"test": "tape test.js | faucet",
"coverage": "nyc --reporter=lcov tape test.js"
"unit": "tape test.js | faucet",
"test": "npm run lint && npm run unit",
"coverage": "nyc --reporter=lcov tape test.js",
"test:ci": "npm run lint && npm run coverage",
"license-checker": "license-checker --production --onlyAllow=\"MIT;ISC;BSD-3-Clause;BSD-2-Clause\""
},
"pre-commit": [
"lint",
"test"
],
"repository": {
Expand Down

0 comments on commit 71a6264

Please sign in to comment.