Skip to content

Commit 489a295

Browse files
authored
[ci] Use GitHub Actions (#1853)
1 parent 77370e0 commit 489a295

File tree

4 files changed

+45
-20
lines changed

4 files changed

+45
-20
lines changed

.github/workflows/ci.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
test:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
node:
13+
- 8
14+
- 10
15+
- 12
16+
- 14
17+
- 15
18+
os:
19+
- macOS-latest
20+
- ubuntu-latest
21+
- windows-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/setup-node@v2
25+
with:
26+
node-version: ${{ matrix.node }}
27+
- run: npm install
28+
- run: npm run lint
29+
if: matrix.node == 14 && matrix.os == 'ubuntu-latest'
30+
- run: npm test
31+
- uses: coverallsapp/[email protected]
32+
with:
33+
flag-name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
34+
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
parallel: true
36+
coverage:
37+
needs: test
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: coverallsapp/[email protected]
41+
with:
42+
github-token: ${{ secrets.GITHUB_TOKEN }}
43+
parallel-finished: true

.travis.yml

-17
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ws: a Node.js WebSocket library
22

33
[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
4-
[![Build](https://img.shields.io/travis/websockets/ws/master.svg?logo=travis)](https://travis-ci.com/websockets/ws)
4+
[![Build](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=build&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
55
[![Windows x86 Build](https://img.shields.io/appveyor/ci/lpinca/ws/master.svg?logo=appveyor)](https://ci.appveyor.com/project/lpinca/ws)
66
[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg)](https://coveralls.io/github/websockets/ws)
77

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"lib/*.js"
2727
],
2828
"scripts": {
29-
"test": "nyc --reporter=html --reporter=text mocha --throw-deprecation test/*.test.js",
29+
"test": "nyc --reporter=lcov --reporter=text mocha --throw-deprecation test/*.test.js",
3030
"integration": "mocha --throw-deprecation test/*.integration.js",
3131
"lint": "eslint --ignore-path .gitignore . && prettier --check --ignore-path .gitignore \"**/*.{json,md,yaml,yml}\""
3232
},
@@ -45,7 +45,6 @@
4545
"devDependencies": {
4646
"benchmark": "^2.1.4",
4747
"bufferutil": "^4.0.1",
48-
"coveralls": "^3.0.3",
4948
"eslint": "^7.2.0",
5049
"eslint-config-prettier": "^8.1.0",
5150
"eslint-plugin-prettier": "^3.0.1",

0 commit comments

Comments
 (0)