Skip to content

Commit 717d99d

Browse files
committed
chore(ci): use travis as a continuous integration tool
1 parent dfa74e5 commit 717d99d

8 files changed

Lines changed: 29 additions & 243 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ _testmain.go
2424
*.prof
2525

2626
vendor
27+
coverage.txt

.travis.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
sudo: required
22
language: go
33
services:
4-
- docker
5-
script: make test
4+
- docker
5+
script:
6+
- make bootstrap
7+
- make test
68
notifications:
79
slack:
8-
secure: E7FiUhFZXtYGOtH3xGk2n3OuwHPP0VCv3NHzvWut8G+vKtzyFIfZTC2K8J8rLM3sZ83m51BilEwNPW7ADMVqbER8z+ns1ZnJzoMMz/Dr1OecYdp5eol+Da7biwgEOBKTHBz20HYh5rHY4d//y0vRF1u1JCTtgHXhPOSnf9SvKWe8QpPEcy+7lx0d3+sIrCyUTjVfgfBIsVLBbKy8rVPAw3xAhRzKm4fcZ8pwiQE0R5GSxAZ1JdeiaMoMqiYLMInyTg+0ohc9LFoMEavBP9/icYrFGQfVWpEstyJ3XKKQA+RIeytM2Fe2d3BFQ1l+upLo30lxOfUYRreX4HCZD1HfiLJz+0uyJbh8+ztYZA77e0tVTt9ZBsT5/RpQZRTdwzPvqYUig6VxH/t+hwQvFTvncHrRLKY6WH9q3be1uc95XwUC1SpUWXq2g+OxQj38SzOiI5sDgag3+eezD1+DRIEsXYqKLIDn5377P+s69wTCC23HjqzJFchLU0HX96zm7CDjEapICHXXA5jDe8Ub8832gq+FhKDv+OSGFyeOeF0EamSc9FL+OrKmswz1lcIwR/sWSsO+aij5qBPtvU6LyUcuMdPYtwA2qslhPAWxSPkrRalWFbNsFEwtP6WvM8ziR1ZpMRLOowE1t2ZvWrUBXZhgPsf9OXkI9SKVGun19J9wB6k=
10+
rooms:
11+
- drycc:xKmLlmJR4hfRAgVIOwdpAoC9#drycc
12+
after_success:
13+
- bash <(curl -s https://codecov.io/bash)

Dockerfile

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

Jenkinsfile

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

Makefile

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
# the filepath to this repository, relative to $GOPATH/src
2-
repo_path = github.com/drycc/controller-sdk-go
2+
REPO_PATH = github.com/drycc/controller-sdk-go
33

4-
REVISION ?= $(shell git rev-parse --short HEAD)
5-
REGISTRY ?= quay.io/
6-
IMAGE_PREFIX ?= drycc
7-
IMAGE := ${REGISTRY}${IMAGE_PREFIX}/controller-sdk-go-dev:${REVISION}
4+
DEV_ENV_IMAGE := quay.io/drycc/go-dev:v0.22.0
5+
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
86

9-
test-style: build-test-image
10-
docker run --rm ${IMAGE} lint
7+
# Enable vendor/ directory support.
8+
export GO15VENDOREXPERIMENT=1
119

12-
test-unit: build-test-image
13-
docker run --rm ${IMAGE} test
10+
PKG_DIRS := ./...
1411

15-
test: build-test-image test-style test-unit
12+
DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
1613

17-
build-test-image:
18-
docker build -t ${IMAGE} .
14+
bootstrap:
15+
${DEV_ENV_CMD} dep ensure
1916

20-
push-test-image:
21-
docker push ${IMAGE}
17+
build:
18+
${DEV_ENV_CMD} go build ${PKG_DIRS}
19+
20+
test-cover:
21+
${DEV_ENV_CMD} test-cover.sh
22+
test-style:
23+
${DEV_ENV_CMD} lint
24+
test: build test-style test-cover
25+
${DEV_ENV_CMD} go test ${PKG_DIRS}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Controller Go SDK
2-
[![Build Status](https://ci.drycc.cc/buildStatus/icon?job=Drycc/controller-sdk-go/master)](https://ci.drycc.cc/job/Drycc/job/controller-sdk-go/job/master/)
2+
[![Build Status](https://travis-ci.org/drycc/controller-sdk-go.svg?branch=master)](https://travis-ci.org/drycc/controller-sdk-go/)
33
[![codecov](https://codecov.io/gh/drycc/controller-sdk-go/branch/master/graph/badge.svg)](https://codecov.io/gh/drycc/controller-sdk-go)
44
[![Go Report Card](https://goreportcard.com/badge/github.com/drycc/controller-sdk-go)](https://goreportcard.com/report/github.com/drycc/controller-sdk-go)
5-
[![codebeat badge](https://codebeat.co/badges/2fdee091-714d-4860-ab19-dba7587a3158)](https://codebeat.co/projects/github-com-drycc-controller-sdk-go)
5+
[![codebeat badge](https://codebeat.co/badges/3ae3560d-eebf-4b36-bbf3-780d2b2e26fd)](https://codebeat.co/projects/github-com-drycc-controller-sdk-go-master)
66
[![GoDoc](https://godoc.org/github.com/drycc/controller-sdk-go?status.svg)](https://godoc.org/github.com/drycc/controller-sdk-go)
77

88
This is the Go SDK for interacting with the [Drycc Controller](https://github.com/drycc/controller).

_scripts/test

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

make.ps1

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

0 commit comments

Comments
 (0)