Skip to content

Commit 2632187

Browse files
committed
upgrade standard and use github action
1 parent 53cbbda commit 2632187

28 files changed

+229
-191
lines changed

.circleci/config.yml

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

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [14.x]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
with:
21+
submodules: true
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: npm install
27+
- run: npm test

.github/workflows/npm-publish.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: npm-publish
2+
on:
3+
push:
4+
branches:
5+
- master # Change this to your default branch
6+
jobs:
7+
npm-publish:
8+
name: npm-publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@master
13+
with:
14+
submodules: true
15+
- name: Set up Node.js
16+
uses: actions/setup-node@master
17+
with:
18+
node-version: 14.0.0
19+
- id: publish
20+
uses: JS-DevTools/npm-publish@v1
21+
with:
22+
token: ${{ secrets.NPM_AUTH_TOKEN }}
23+
- name: Create Release
24+
if: steps.publish.outputs.type != 'none'
25+
id: create_release
26+
uses: actions/create-release@v1
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
with:
30+
tag_name: ${{ steps.publish.outputs.version }}
31+
release_name: Release ${{ steps.publish.outputs.version }}
32+
body: ${{ steps.publish.outputs.version }}
33+
draft: false
34+
prerelease: false

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Discord](https://img.shields.io/badge/chat-on%20discord-brightgreen.svg)](https://discord.gg/GsEFRM8)
44
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-brightgreen.svg)](https://gitter.im/PrismarineJS/general)
55
[![Irc](https://img.shields.io/badge/chat-on%20irc-brightgreen.svg)](https://irc.gitter.im/)
6-
[![Build Status](https://img.shields.io/circleci/project/github/ProtoDef-io/node-protodef/master.svg)](https://circleci.com/gh/ProtoDef-io/node-protodef)
6+
[![Build Status](https://github.com/ProtoDef-io/node-protodef/workflows/CI/badge.svg)](https://github.com/ProtoDef-io/node-protodef/actions?query=workflow%3A%22CI%22)
77
[![Tonic](https://img.shields.io/badge/tonic-try%20it-blue.svg)](https://tonicdev.com/npm/protodef)
88
[![Try it on gitpod](https://img.shields.io/badge/try-on%20gitpod-brightgreen.svg)](https://gitpod.io/#https://github.com/ProtoDef-io/node-protodef)
99

benchmark/benchmark_all_types.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ it('reads', function () {
2020
.on('cycle', function (event) {
2121
console.log(String(event.target))
2222
})
23-
.run({ 'async': false })
23+
.run({ async: false })
2424
})
2525

2626
it('writes', function () {
@@ -40,7 +40,7 @@ it('writes', function () {
4040
.on('cycle', function (event) {
4141
console.log(String(event.target))
4242
})
43-
.run({ 'async': false })
43+
.run({ async: false })
4444
})
4545

4646
it('reads (compiled)', function () {
@@ -60,7 +60,7 @@ it('reads (compiled)', function () {
6060
.on('cycle', function (event) {
6161
console.log(String(event.target))
6262
})
63-
.run({ 'async': false })
63+
.run({ async: false })
6464
})
6565

6666
it('writes (compiled)', function () {
@@ -80,5 +80,5 @@ it('writes (compiled)', function () {
8080
.on('cycle', function (event) {
8181
console.log(String(event.target))
8282
})
83-
.run({ 'async': false })
83+
.run({ async: false })
8484
})

benchmark/benchmark_by_kind.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ testData.forEach(tests => {
2121
.on('cycle', function (event) {
2222
console.log(String(event.target))
2323
})
24-
.run({ 'async': false })
24+
.run({ async: false })
2525
})
2626

2727
it('writes', function () {
@@ -38,7 +38,7 @@ testData.forEach(tests => {
3838
.on('cycle', function (event) {
3939
console.log(String(event.target))
4040
})
41-
.run({ 'async': false })
41+
.run({ async: false })
4242
})
4343

4444
it('reads (compiled)', function () {
@@ -55,7 +55,7 @@ testData.forEach(tests => {
5555
.on('cycle', function (event) {
5656
console.log(String(event.target))
5757
})
58-
.run({ 'async': false })
58+
.run({ async: false })
5959
})
6060

6161
it('writes (compiled)', function () {
@@ -72,7 +72,7 @@ testData.forEach(tests => {
7272
.on('cycle', function (event) {
7373
console.log(String(event.target))
7474
})
75-
.run({ 'async': false })
75+
.run({ async: false })
7676
})
7777
})
7878
})

benchmark/benchmark_by_subtype.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function testType (type, values) {
1414
.on('cycle', function (event) {
1515
console.log(String(event.target))
1616
})
17-
.run({ 'async': false })
17+
.run({ async: false })
1818
})
1919

2020
it('writes', function () {
@@ -27,7 +27,7 @@ function testType (type, values) {
2727
.on('cycle', function (event) {
2828
console.log(String(event.target))
2929
})
30-
.run({ 'async': false })
30+
.run({ async: false })
3131
})
3232

3333
it('reads (compiled)', function () {
@@ -40,7 +40,7 @@ function testType (type, values) {
4040
.on('cycle', function (event) {
4141
console.log(String(event.target))
4242
})
43-
.run({ 'async': false })
43+
.run({ async: false })
4444
})
4545

4646
it('writes (compiled)', function () {
@@ -53,7 +53,7 @@ function testType (type, values) {
5353
.on('cycle', function (event) {
5454
console.log(String(event.target))
5555
})
56-
.run({ 'async': false })
56+
.run({ async: false })
5757
})
5858
}
5959

benchmark/benchmark_by_test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function testValue (type, value, buffer) {
1212
.on('cycle', function (event) {
1313
console.log(String(event.target))
1414
})
15-
.run({ 'async': false })
15+
.run({ async: false })
1616
})
1717
it('reads', function () {
1818
const suite = new Benchmark.Suite()
@@ -22,7 +22,7 @@ function testValue (type, value, buffer) {
2222
.on('cycle', function (event) {
2323
console.log(String(event.target))
2424
})
25-
.run({ 'async': false })
25+
.run({ async: false })
2626
})
2727

2828
it('writes (compiled)', function () {
@@ -33,7 +33,7 @@ function testValue (type, value, buffer) {
3333
.on('cycle', function (event) {
3434
console.log(String(event.target))
3535
})
36-
.run({ 'async': false })
36+
.run({ async: false })
3737
})
3838
it('reads (compiled)', function () {
3939
const suite = new Benchmark.Suite()
@@ -43,7 +43,7 @@ function testValue (type, value, buffer) {
4343
.on('cycle', function (event) {
4444
console.log(String(event.target))
4545
})
46-
.run({ 'async': false })
46+
.run({ async: false })
4747
})
4848
}
4949

benchmark/benchmark_by_type.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ testData.forEach(tests => {
2121
.on('cycle', function (event) {
2222
console.log(String(event.target))
2323
})
24-
.run({ 'async': false })
24+
.run({ async: false })
2525
})
2626

2727
it('writes', function () {
@@ -36,7 +36,7 @@ testData.forEach(tests => {
3636
.on('cycle', function (event) {
3737
console.log(String(event.target))
3838
})
39-
.run({ 'async': false })
39+
.run({ async: false })
4040
})
4141

4242
it('reads (compiled)', function () {
@@ -51,7 +51,7 @@ testData.forEach(tests => {
5151
.on('cycle', function (event) {
5252
console.log(String(event.target))
5353
})
54-
.run({ 'async': false })
54+
.run({ async: false })
5555
})
5656

5757
it('writes (compiled)', function () {
@@ -66,7 +66,7 @@ testData.forEach(tests => {
6666
.on('cycle', function (event) {
6767
console.log(String(event.target))
6868
})
69-
.run({ 'async': false })
69+
.run({ async: false })
7070
})
7171
})
7272
})

0 commit comments

Comments
 (0)