Skip to content

Commit 1299053

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

File tree

5 files changed

+47
-35
lines changed

5 files changed

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