Skip to content

Commit

Permalink
use GH actions instead of Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
heldinz committed Aug 15, 2024
1 parent be00320 commit 9a88b08
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[package.json]
[*.{json,yml}]
indent_style = space
indent_size = 2

Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on:
- push
- pull_request
env:
latest-node: 22.x

jobs:
test:
name: Test
runs-on: ubuntu-latest

strategy:
matrix:
node:
- version: 18.x
- version: 20.x
- version: ${{ latest-node }}

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node.version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node.version }}
cache: "npm"
- run: npm ci
- run: npm test

coverage:
name: Coverage
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ latest-node }}
cache: "npm"

- name: Coverage
run: npm run coverage:lcov

- name: Coveralls
uses: coverallsapp/[email protected]
27 changes: 0 additions & 27 deletions .github/workflows/node-ci.js.yml

This file was deleted.

5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"scripts": {
"test": "mocha -R spec",
"coverage": "nyc --reporter=html npm run test",
"coveralls": "nyc --reporter=lcovonly npm run test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
"coverage:html": "nyc --reporter=html npm run test",
"coverage:lcov": "nyc --reporter=lcovonly npm run test"
},
"files": [
"index.js"
Expand Down

0 comments on commit 9a88b08

Please sign in to comment.