Skip to content

Commit bd33c5f

Browse files
switch to GitHub Actions (#83)
* Switch to GitHub Actions * chore(ci): switch to GitHub Actions * chore(ci): switch reporter from nyc to c8 * chore(nyc): remove dependency * move .eslintrc to .eslintrc.yaml (be explicit) * noop: ws Co-authored-by: silverwind <[email protected]>
1 parent dbfe59b commit bd33c5f

File tree

6 files changed

+69
-25
lines changed

6 files changed

+69
-25
lines changed

.eslintrc

-9
This file was deleted.

.eslintrc.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root: true
2+
3+
# https://eslint.org/docs/user-guide/configuring/language-options#specifying-environments
4+
env:
5+
node: true
6+
es6: true
7+
8+
extends: standard

.github/workflows/ci.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
env:
10+
CI: true
11+
node-version: 16
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/setup-node@v3
18+
name: Node ${{ env.node-version }}
19+
with:
20+
node-version: ${{ env.node-version }}
21+
- uses: actions/checkout@v3
22+
- run: npm install
23+
- run: npm run lint
24+
25+
test:
26+
needs: lint
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
os: [ ubuntu-latest ]
31+
node: [ 6, 8, 10, 12, 14, 16 ]
32+
runs-on: ${{ matrix.os }}
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-node@v3
36+
with:
37+
node-version: ${{ matrix.node }}
38+
- run: npm install
39+
- run: npm test
40+
41+
coverage:
42+
needs: test
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v3
46+
- uses: actions/setup-node@v3
47+
with:
48+
node-version: ${{ matrix.node }}
49+
- run: npm install
50+
- run: npx -y c8 --reporter=lcov npm test
51+
env:
52+
NODE_ENV: cov
53+
54+
- name: codecov
55+
uses: codecov/codecov-action@v2
56+
57+
- name: Coveralls
58+
uses: coverallsapp/github-action@master
59+
with:
60+
github-token: ${{ secrets.github_token }}

.travis.yml

-14
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dns-packet
2-
[![](https://img.shields.io/npm/v/dns-packet.svg?style=flat)](https://www.npmjs.org/package/dns-packet) [![](https://img.shields.io/npm/dm/dns-packet.svg)](https://www.npmjs.org/package/dns-packet) [![](https://api.travis-ci.org/mafintosh/dns-packet.svg?style=flat)](https://travis-ci.org/mafintosh/dns-packet) [![Coverage Status](https://coveralls.io/repos/github/mafintosh/dns-packet/badge.svg?branch=master)](https://coveralls.io/github/mafintosh/dns-packet?branch=master)
2+
[![](https://img.shields.io/npm/v/dns-packet.svg?style=flat)](https://www.npmjs.org/package/dns-packet) [![](https://img.shields.io/npm/dm/dns-packet.svg)](https://www.npmjs.org/package/dns-packet) [![](https://github.com/github/mafintosh/dns-packet/workflows/ci.yml/badge.svg)](https://github.com/github/mafintosh/dns-packet/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/mafintosh/dns-packet/badge.svg?branch=master)](https://coveralls.io/github/mafintosh/dns-packet?branch=master)
33

44
An [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compliant module for encoding / decoding DNS packets. Lifted out of [multicast-dns](https://github.com/mafintosh/multicast-dns) as a separate module.
55

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"eslint-plugin-node": "^8.0.1",
2727
"eslint-plugin-promise": "^4.0.1",
2828
"eslint-plugin-standard": "^4.0.0",
29-
"nyc": "^13.3.0",
3029
"tape": "^4.10.1"
3130
},
3231
"keywords": [

0 commit comments

Comments
 (0)