diff --git a/.drone.yml b/.drone.yml index a8a22d461..6385fe95b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,15 +7,15 @@ workspace: path: src/github.com/laszlocph/drone-oss-08 pipeline: - # test: - # image: golang:1.12 - # commands: - # - go get -u golang.org/x/tools/cmd/cover - # - go get -u golang.org/x/net/context - # - go get -u golang.org/x/net/context/ctxhttp - # - go get -u github.com/golang/protobuf/proto - # - go get -u github.com/golang/protobuf/protoc-gen-go - # - go test -cover $(go list ./... | grep -v /vendor/) + test: + image: golang:1.12 + commands: + - go get -u golang.org/x/tools/cmd/cover + - go get -u golang.org/x/net/context + - go get -u golang.org/x/net/context/ctxhttp + - go get -u github.com/golang/protobuf/proto + - go get -u github.com/golang/protobuf/protoc-gen-go + - go test -cover $(go list ./... | grep -v /vendor/) test_postgres: image: golang:1.12 diff --git a/cmd/drone-server/main_test.go b/cmd/drone-server/main_test.go index 82628bb1a..f72ac21f8 100644 --- a/cmd/drone-server/main_test.go +++ b/cmd/drone-server/main_test.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build manual + package main import ( @@ -36,6 +38,13 @@ func Test_main(t *testing.T) { app.Version = version.Version.String() app.Usage = "drone server" app.Action = server + + flags = append(flags, cli.StringFlag{ + EnvVar: "TEST_RUN", + Name: "test.run", + Usage: "VSCode sets this flag", + }) + app.Flags = flags app.Before = before diff --git a/cmd/drone-server/server.go b/cmd/drone-server/server.go index 713ad280a..34ea9cb31 100644 --- a/cmd/drone-server/server.go +++ b/cmd/drone-server/server.go @@ -57,11 +57,6 @@ import ( ) var flags = []cli.Flag{ - cli.StringFlag{ - EnvVar: "TEST_RUNE", - Name: "test.run", - Usage: "VSCode sets this flag", - }, cli.BoolFlag{ EnvVar: "DRONE_DEBUG", Name: "debug",