Skip to content

Commit e50511e

Browse files
committed
feat(nodetime): add sta pkg and refactor
a new pkg/ called nodetime added to host and use a single NodeJS runtime that has multiple CLIs bundled inside. * `swagger-typescript-api` CLI added alongside `protobufjs` CLI. * switched Starport's Go compiler to 1.16 beta to benefit from new the `embed` feature. it'll be switched to stable 1.16 release once it's available (likely this Feb).
1 parent bf657b2 commit e50511e

File tree

22 files changed

+342
-118
lines changed

22 files changed

+342
-118
lines changed

.github/workflows/goreleaser.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v2
1717
with:
18-
go-version: 1.15
18+
go-version: "1.16.0-rc1"
19+
stable: false
1920

2021
- name: Set up Node
2122
uses: actions/setup-node@v2-beta
@@ -31,8 +32,6 @@ jobs:
3132
3233
- name: Checkout
3334
uses: actions/checkout@v2
34-
with:
35-
lfs: true
3635
with:
3736
path: ${{ env.working-directory }}
3837
fetch-depth: 0

.github/workflows/lint.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,18 @@ jobs:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 6
1313
steps:
14-
- uses: actions/checkout@v2
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
1516
with:
16-
lfs: true
17+
go-version: "1.16.0-rc1"
18+
stable: false
19+
20+
- uses: actions/checkout@v2
21+
1722
- uses: golangci/golangci-lint-action@master
1823
with:
19-
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
20-
version: v1.28
24+
version: v1.36.0
2125
args: --timeout 10m
2226
github-token: ${{ secrets.github_token }}
27+
skip-go-installation: true
2328

.github/workflows/npm-publish.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v1
12-
with:
13-
lfs: true
1412
- uses: actions/setup-node@v1
1513
with:
1614
node-version: 14

.github/workflows/test-e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
- name: Set up Go
1717
uses: actions/setup-go@v2
1818
with:
19-
go-version: 1.15
19+
go-version: "1.16.0-rc1"
20+
stable: false
2021

2122
- name: Set up Node
2223
uses: actions/setup-node@v2-beta
@@ -34,7 +35,6 @@ jobs:
3435
with:
3536
path: ${{ env.working-directory }}
3637
fetch-depth: 0
37-
lfs: true
3838

3939
- name: Build UI
4040
working-directory: ${{ env.working-directory }}

.github/workflows/test-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v2
1919
with:
20-
go-version: 1.15
20+
go-version: "1.16.0-rc1"
21+
stable: false
2122

2223
- name: Install protoc
2324
uses: arduino/setup-protoc@v1
@@ -30,7 +31,6 @@ jobs:
3031
with:
3132
path: ${{ env.working-directory }}
3233
fetch-depth: 0
33-
lfs: true
3434

3535
- name: Build UI
3636
working-directory: ${{ env.working-directory }}

.github/workflows/test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15-
with:
16-
lfs: true
1715
- uses: actions/setup-go@v2
1816
with:
19-
go-version: '1.15'
17+
go-version: "1.16.0-rc1"
18+
stable: false
2019
- run: ./scripts/test-unit

.gitpod.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
FROM gitpod/workspace-full
22

3+
RUN wget https://golang.org/dl/go1.16rc1.linux-amd64.tar.gz && \
4+
rm -rf /go && \
5+
tar -C $HOME -xzf go1.16rc1.linux-amd64.tar.gz && \
6+
rm go1.16rc1.linux-amd64.tar.gz
7+
38
RUN brew install gh protobuf

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/tendermint/starport
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/AlecAivazis/survey/v2 v2.1.1
@@ -28,6 +28,7 @@ require (
2828
github.com/imdario/mergo v0.3.11
2929
github.com/improbable-eng/grpc-web v0.13.0
3030
github.com/jpillora/chisel v1.7.3
31+
github.com/kevinburke/go-bindata v3.22.0+incompatible // indirect
3132
github.com/manifoldco/promptui v0.8.0
3233
github.com/mattn/go-zglob v0.0.3
3334
github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ github.com/karrick/godirwalk v1.16.1 h1:DynhcF+bztK8gooS0+NDJFrdNZjJ3gzVzC545UNA
480480
github.com/karrick/godirwalk v1.16.1/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
481481
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
482482
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
483+
github.com/kevinburke/go-bindata v3.22.0+incompatible h1:/JmqEhIWQ7GRScV0WjX/0tqBrC5D21ALg0H0U/KZ/ts=
484+
github.com/kevinburke/go-bindata v3.22.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM=
483485
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY=
484486
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
485487
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=

scripts/data/gen-protobufjs/bin/pb renamed to scripts/data/gen-protobufjs/bin/nodetime

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env node
2+
23
var path = require("path"),
34
jscli = require("../pbjs.js"),
45
tscli = require("../pbts.js");
@@ -7,6 +8,11 @@ var args = process.argv.slice(3);
78
var mode = process.argv[2];
89
var ret;
910

11+
if (mode === "sta") {
12+
require("../sta");
13+
return;
14+
}
15+
1016
if (mode === "js") {
1117
ret = jscli.main(args);
1218
} else {

0 commit comments

Comments
 (0)