File tree Expand file tree Collapse file tree 2 files changed +33
-16
lines changed Expand file tree Collapse file tree 2 files changed +33
-16
lines changed Original file line number Diff line number Diff line change 1
- env :
2
- - GO111MODULE=on
3
-
4
- language : go
5
- go :
6
- - 1.12.x
7
- - master
8
- before_install :
9
- - go get github.com/mattn/goveralls
1
+ language : minimal
2
+ env : GO111MODULE=on
10
3
git :
11
4
depth : 1
12
- script :
13
- - go test -v -race ./... -coverprofile=profile.cov
14
- - $GOPATH/bin/goveralls -coverprofile=profile.cov -service=travis-ci
5
+ install :
6
+ - eval "$(gimme)"
15
7
stages :
16
8
- ' Lint'
17
9
- ' Integration tests'
18
- - ' Test '
10
+ - ' Unit test '
19
11
jobs :
20
12
include :
21
13
- stage : ' Lint'
22
- install :
14
+ env : GIMME_GO_VERSION=1.12.x GIMME_OS=linux GIMME_ARCH=amd64
15
+ before_script :
23
16
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.19.0
24
17
script :
25
18
- $GOPATH/bin/golangci-lint run --out-format=tab --tests=false optimizely/...
34
27
script :
35
28
- " $HOME/travisci-tools/fsc-trigger/trigger_fullstack-sdk-compat.sh"
36
29
after_success : travis_terminate 0
37
-
30
+ - &test
31
+ stage : ' Unit test'
32
+ env : GIMME_GO_VERSION=master GIMME_OS=linux GIMME_ARCH=amd64
33
+ script :
34
+ - go test -v -race ./... -coverprofile=profile.cov
35
+ - << : *test
36
+ stage : ' Unit test'
37
+ env : GIMME_GO_VERSION=1.8.x
38
+ before_script :
39
+ # GO module was not introduced earlier. need symlink to search in GOPATH
40
+ - mkdir -p $GOPATH/src/github.com && pushd $GOPATH/src/github.com && ln -s $HOME/build/optimizely optimizely && popd
41
+ script :
42
+ # Need to download packages explicitly
43
+ - go get -v -d ./...
44
+ # This pkg not in go 1.8
45
+ - go get github.com/stretchr/testify
46
+ # -coverprofile was not introduced in 1.8
47
+ - go test -v -race ./...
48
+ - << : *test
49
+ stage : ' Unit test'
50
+ env : GIMME_GO_VERSION=1.12.x
51
+ before_script :
52
+ - go get github.com/mattn/goveralls
53
+ after_success :
54
+ - $GOPATH/bin/goveralls -coverprofile=profile.cov -service=travis-ci
Original file line number Diff line number Diff line change 1
1
# Optimizely Go SDK
2
2
3
3
[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/optimizely/go-sdk )] ( https://goreportcard.com/report/github.com/optimizely/go-sdk )
4
- [ ![ Coverage Status] ( https://coveralls.io/repos/github/optimizely/go-sdk/badge.svg?branch=go-alpha )] ( https://coveralls.io/github/optimizely/go-sdk?branch=go-alpha )
4
+ [ ![ Coverage Status] ( https://coveralls.io/repos/github/optimizely/go-sdk/badge.svg?branch=master )] ( https://coveralls.io/github/optimizely/go-sdk?branch=master )
5
5
6
6
## Usage
7
7
You can’t perform that action at this time.
0 commit comments