Skip to content

Commit 87447af

Browse files
committed
use GH actions instead of Travis CI
1 parent be00320 commit 87447af

File tree

5 files changed

+45
-35
lines changed

5 files changed

+45
-35
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ charset = utf-8
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010

11-
[package.json]
11+
[*.{json,yml}]
1212
indent_style = space
1313
indent_size = 2
1414

.github/workflows/main.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
6+
jobs:
7+
test:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
node-version: [18.x, 20.x, 22.x]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: ${{ matrix.node-version }}
21+
cache: "npm"
22+
- run: npm ci
23+
- run: npm test
24+
25+
coverage:
26+
name: Coverage
27+
runs-on: ubuntu-latest
28+
needs: test
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
- uses: actions/setup-node@v4
33+
with:
34+
node-version: 22.x
35+
cache: "npm"
36+
- run: npm ci
37+
38+
- name: Coverage
39+
run: npm run coverage:lcov
40+
41+
- name: Coveralls
42+
uses: coverallsapp/github-action@v2.3.0

.github/workflows/node-ci.js.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
},
1515
"scripts": {
1616
"test": "mocha -R spec",
17-
"coverage": "nyc --reporter=html npm run test",
18-
"coveralls": "nyc --reporter=lcovonly npm run test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
17+
"coverage:html": "nyc --reporter=html npm run test",
18+
"coverage:lcov": "nyc --reporter=lcovonly npm run test"
1919
},
2020
"files": [
2121
"index.js"

0 commit comments

Comments
 (0)