Skip to content

Commit c2d9c1b

Browse files
authoredJun 17, 2019
Rearrange protobuf files (#251)
* move protobuf definitions under rpc/commands * move commands daemon into commands folder * make client a test case * run protoc as part of the testing pipeline
1 parent 5cca8e2 commit c2d9c1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+919
-761
lines changed
 

‎.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go:
44
- 1.12.x
55

66
env:
7-
- GO111MODULE=on
7+
- GO111MODULE=on PATH=$HOME/protobuf/bin:$PATH
88

99
# Anything in before_script that returns a nonzero exit code will flunk the
1010
# build and immediately stop. It's sorta like having set -e enabled in bash.
@@ -13,17 +13,22 @@ install:
1313
- curl -sL https://taskfile.dev/install.sh | sh
1414
- go get github.com/golangci/govet
1515
- go get golang.org/x/lint/golint
16+
- go get -u github.com/golang/protobuf/protoc-gen-go
17+
- |
18+
mkdir -p $HOME/protobuf && pushd $HOME/protobuf &&
19+
curl -LO 'https://github.com/google/protobuf/releases/download/v3.8.0/protoc-3.8.0-linux-x86_64.zip' &&
20+
unzip protoc-3.8.0-linux-x86_64.zip &&
21+
popd
1622
1723
script:
1824
# Check if the code is formatted and run linter
1925
- ./bin/task check
2026
# Build and test
27+
- ./bin/task protoc
2128
- ./bin/task build
2229
- ./bin/task test
2330
- ./bin/task test-legacy
2431

2532
after_success:
2633
- bash <(curl -s https://codecov.io/bash) -cF unit -f '*_unit.txt'
2734
- bash <(curl -s https://codecov.io/bash) -cF integ -f '*_integ.txt'
28-
29-

‎Taskfile.yml

100644100755
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
version: '2'
22

33
tasks:
4+
protoc:
5+
desc: Compile protobuf definitions
6+
cmds:
7+
- protoc --proto_path=rpc --go_out=plugins=grpc,paths=source_relative:rpc ./rpc/commands/*.proto
8+
49
build:
510
desc: Build the project
611
cmds:
@@ -45,6 +50,11 @@ tasks:
4550
- test -z $(go fmt ./legacy/...)
4651
- go vet ./legacy/...
4752

53+
rpc-client:
54+
desc: Run the rpc client test routine (server must be already started)
55+
cmds:
56+
- go test -run TestWithClientE2E ./commands/daemon
57+
4858
vars:
4959
# all modules of this project except for "legacy/..." module
5060
DEFAULT_TARGETS:
@@ -67,4 +77,4 @@ vars:
6777
-X github.com/arduino/arduino-cli/version.commit={{.TEST_COMMIT}}'
6878
6979
# check-lint vars
70-
GOLINTFLAGS: "-min_confidence 0.8 -set_exit_status"
80+
GOLINTFLAGS: "-min_confidence 0.8 -set_exit_status"

0 commit comments

Comments
 (0)
Please sign in to comment.