Skip to content

Commit a9df899

Browse files
committed
Setup github action for unit test
1 parent 3878959 commit a9df899

File tree

5 files changed

+42
-416
lines changed

5 files changed

+42
-416
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Test"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- develop
8+
9+
jobs:
10+
release:
11+
name: Build and run test
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
node-version: [10.x, 12.x, 14.x]
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
- name: Setup node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
registry-url: "https://registry.npmjs.org"
24+
- run: yarn install
25+
- run: yarn test
26+
env:
27+
NODE_ENV: test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
node_modules
2-
.nyc_output/
32
coverage/
43
.DS_Store
54

benchmark/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const suite = new Benchmark.Suite();
55
const testData = require("./test.json");
66

77
const stringifyPackages = {
8-
"quick-stable-stringify": require("../index"),
8+
"quick-stable-stringify": require("../dist/index"),
99
"fast-json-stable-stringify": true,
1010
"json-stable-stringify": true,
1111
"fast-stable-stringify": true,

package.json

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "quick-stable-stringify",
33
"version": "1.0.0",
4-
"description": "deterministic `JSON.stringify()` - a faster version of Evgeny's fast-json-stable-strigify. Built with Typescript and modern Javascript.",
4+
"description": "Deterministic `JSON.stringify()` - a faster version of Evgeny's fast-json-stable-strigify. Built with Typescript and modern Javascript.",
55
"main": "./dist/index.js",
66
"exports": "./dist/index.js",
77
"types": "./dist/index.d.ts",
@@ -23,7 +23,6 @@
2323
"faster-stable-stringify": "latest",
2424
"jest": "^26.6.3",
2525
"json-stable-stringify": "latest",
26-
"nyc": "^14.1.0",
2726
"pre-commit": "^1.2.2",
2827
"source-map-support": "^0.5.19",
2928
"ts-jest": "^26.4.4",
@@ -63,20 +62,6 @@
6362
}
6463
],
6564
"license": "MIT",
66-
"nyc": {
67-
"extension": [
68-
".ts"
69-
],
70-
"exclude": [
71-
"test",
72-
"node_modules",
73-
"**/*.d.ts"
74-
],
75-
"reporter": [
76-
"lcov",
77-
"text-summary"
78-
]
79-
},
8065
"engines": {
8166
"node": ">=10"
8267
}

0 commit comments

Comments
 (0)