Skip to content

Commit 7e057e3

Browse files
azure-pipelines[bot]delvedor
authored andcommitted
Set up CI with Azure Pipelines (#141)
As titled.
1 parent c3c2cf7 commit 7e057e3

File tree

3 files changed

+43
-5
lines changed

3 files changed

+43
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# fast-json-stringify  [![Build Status](https://travis-ci.org/fastify/fast-json-stringify.svg?branch=master)](https://travis-ci.org/fastify/fast-json-stringify)
1+
# fast-json-stringify
22

3-
[![Greenkeeper badge](https://badges.greenkeeper.io/fastify/fast-json-stringify.svg)](https://greenkeeper.io/)
3+
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://dev.azure.com/fastify/fastify/_apis/build/status/fastify.fast-json-stringify?branchName=master)](https://dev.azure.com/fastify/fastify/_build/latest?definitionId=3&branchName=master) [![Build Status](https://travis-ci.org/fastify/fast-json-stringify.svg?branch=master)](https://travis-ci.org/fastify/fast-json-stringify) [![NPM downloads](https://img.shields.io/npm/dm/fast-json-stringify.svg?style=flat)](https://www.npmjs.com/package/fast-json-stringify)
44

55
__fast-json-stringify__ is significantly faster than `JSON.stringify()` for small payloads. Its performance advantage shrinks as your payload grows. It pairs well with [__flatstr__](https://www.npmjs.com/package/flatstr), which triggers a V8 optimization that improves performance when eventually converting the string to a `Buffer`.
66

azure-pipelines.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
pool:
2+
vmImage: 'ubuntu-16.04'
3+
4+
strategy:
5+
matrix:
6+
node_6_x:
7+
node_version: 6.x
8+
node_8_x:
9+
node_version: 8.x
10+
node_10_x:
11+
node_version: 10.x
12+
node_11_x:
13+
node_version: 11.x
14+
15+
steps:
16+
- task: NodeTool@0
17+
inputs:
18+
versionSpec: $(node_version)
19+
displayName: Install Node.js
20+
21+
- bash: npm install
22+
displayName: Install dependencies
23+
24+
- bash: npm run test:lint
25+
displayName: Linter
26+
27+
- bash: npm run test:report && npm run test:reporter
28+
displayName: Test
29+
30+
- task: PublishTestResults@2
31+
displayName: "Publish Test Results"
32+
condition: succeededOrFailed()
33+
inputs:
34+
testResultsFiles: "**test/junit-testresults.xml"
35+
testRunTitle: TestRun $(node_version)

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
"main": "index.js",
66
"scripts": {
77
"benchmark": "node bench.js",
8-
"lint": "standard",
9-
"unit": "tap -j4 test/*.test.js test/**/*.test.js",
10-
"test": "npm run lint && npm run unit"
8+
"test:lint": "standard",
9+
"test:unit": "tap -J test/*.test.js test/**/*.test.js",
10+
"test": "npm run test:lint && npm run test:unit",
11+
"test:report": "npm run test:unit | tee out.tap",
12+
"test:reporter": "tap-mocha-reporter xunit < out.tap > test/junit-testresults.xml"
1113
},
1214
"precommit": "test",
1315
"repository": {
@@ -34,6 +36,7 @@
3436
"proxyquire": "^2.1.0",
3537
"standard": "^12.0.1",
3638
"tap": "^12.5.1",
39+
"tap-mocha-reporter": "^3.0.9",
3740
"uglify-es": "^3.3.9"
3841
},
3942
"dependencies": {

0 commit comments

Comments
 (0)