Skip to content

Commit

Permalink
Use GitHub workflows instead of Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Jan 13, 2021
1 parent 9edf077 commit 6652ebe
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 16 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint

on: push

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Install and cache dependencies
uses: bahmutov/npm-install@v1

- name: Run linter
run: npm run lint
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on: push

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]

steps:
- uses: actions/checkout@v1

- name: Install and cache dependencies
uses: bahmutov/npm-install@v1

- name: Run tests
run: npm run coverage

- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
parallel: true

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

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
"index.js"
],
"scripts": {
"test": "xo --quiet && npm run ava",
"ava": "npx ava --concurrency 1 # Unfortunately have to do this so we don't try to bind to the same port multiple times",
"coverage": "nyc npm test && nyc report --reporter=html",
"travis": "npx nyc npm test && npx nyc report --reporter=text-lcov | coveralls",
"lint": "xo",
"test": "npx ava --concurrency 1 # Unfortunately have to do this so we don't try to bind to the same port multiple times",
"coverage": "nyc npm test && nyc report --reporter=lcov",
"document": "documentation build index.js -f html -o docs --config documentation.yml",
"prepublishOnly": "npm test",
"preversion": "npm test"
Expand Down

0 comments on commit 6652ebe

Please sign in to comment.