Skip to content

Commit

Permalink
Actions (#1)
Browse files Browse the repository at this point in the history
* 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)

Co-authored-by: silverwind <me@silverwind.io>
  • Loading branch information
msimerson and silverwind committed May 31, 2022
1 parent a014082 commit 385bf2c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 48 deletions.
9 changes: 0 additions & 9 deletions .eslintrc

This file was deleted.

8 changes: 8 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root: true

# https://eslint.org/docs/user-guide/configuring/language-options#specifying-environments
env:
node: true
es6: true

extends: standard
48 changes: 42 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,56 @@ on:
- master
pull_request:

env:
CI: true
node-version: 16

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
name: Node ${{ env.node-version }}
with:
node-version: ${{ env.node-version }}
- uses: actions/checkout@v3
- run: npm install
- run: npm run lint

test:
needs: lint
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['6', '8', '10', '12', '14', '16']
os: [ ubuntu-latest ]
node: [ 6, 8, 10, 12, 14, 16 ]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run coverage
- run: npx nyc report --reporter=text-lcov | npx coveralls
- run: npm test

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npx -y c8 --reporter=lcov npm test
env:
NODE_ENV: cov

- name: codecov
uses: codecov/codecov-action@v2

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
31 changes: 0 additions & 31 deletions .github/workflows/node.js.yml

This file was deleted.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
"@leichtgewicht/ip-codec": "^2.0.1"
},
"devDependencies": {
"coveralls": "^3.1.1",
"eslint": "^5.14.1",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-node": "^8.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"nyc": "^13.3.0",
"tape": "^4.10.1"
},
"keywords": [
Expand Down

0 comments on commit 385bf2c

Please sign in to comment.