Skip to content

Commit 611e0b7

Browse files
authored
Added gh actions (#30)
* Added gh actions * npm coverage command * node 14
1 parent c331fef commit 611e0b7

File tree

6 files changed

+236
-15
lines changed

6 files changed

+236
-15
lines changed

.github/FUNDING.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: w8r
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/nodejs.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [master]
9+
pull_request:
10+
branches: [master]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
node-version: [10.x, 14.x]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: codecov/codecov-action@v2
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v1
25+
with:
26+
token: ${{ secrets.CODECOV_TOKEN }}
27+
node-version: ${{ matrix.node-version }}
28+
- run: npm ci
29+
- run: npm run build --if-present
30+
- run: npm test
31+
- run: npm run coverage

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*.*.*'
5+
6+
jobs:
7+
publish:
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v1
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npm test
19+
- uses: JS-DevTools/npm-publish@v1
20+
with:
21+
token: ${{ secrets.NPM_TOKEN }}

.travis.yml

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

package-lock.json

Lines changed: 169 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"test": "nyc mocha tests/**/*.test.ts",
3434
"posttest": "nyc report --reporter=json",
3535
"prepublishOnly": "npm run build && npm test",
36-
"clean": "rm -rf dist coverage .nyc"
36+
"clean": "rm -rf dist coverage .nyc",
37+
"coverage": "codecov -f coverage/*.json"
3738
},
3839
"devDependencies": {
3940
"@types/chai": "^4.1.4",
@@ -42,6 +43,7 @@
4243
"benchmark": "^2.1.4",
4344
"bintrees": "^1.0.2",
4445
"chai": "^4.2.0",
46+
"codecov": "^3.8.3",
4547
"mocha": "^6.2.0",
4648
"nodemon": "^1.19.2",
4749
"nyc": "^14.1.1",

0 commit comments

Comments
 (0)