Skip to content

Commit

Permalink
Merge pull request #42 from etpinard/bye-bye-travis
Browse files Browse the repository at this point in the history
Add `ci.yml` workflow
  • Loading branch information
etpinard authored Jan 17, 2023
2 parents e2493fd + 19491d6 commit 1a9d37c
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Node.js CI

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

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 19.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
30 changes: 30 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Node.js coveralls

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

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run coveralls
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
test/build
.nyc_output
coverage
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"test": "standard | snazzy && mocha",
"cover": "nyc npm test",
"coveralls": "npm run cover && nyc report --reporter=text-lcov | coveralls"
"coveralls": "nyc --reporter=lcovonly npm test"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 1a9d37c

Please # to comment.