File tree Expand file tree Collapse file tree 2 files changed +25
-40
lines changed Expand file tree Collapse file tree 2 files changed +25
-40
lines changed Original file line number Diff line number Diff line change 1
- os :
2
- - linux
3
-
4
1
language : go
5
-
2
+ sudo : required
6
3
go :
7
- - 1.11.x
8
-
4
+ - " 1.12"
9
5
services :
10
- - docker
11
-
12
- env :
13
- global :
14
- - GOTFLAGS="-race"
15
- - IPFS_PATH=/tmp/ipfs
16
- matrix :
17
- - BUILD_DEPTYPE=gx
18
- - BUILD_DEPTYPE=gomod
6
+ - docker
7
+ env : GO111MODULE=on
19
8
20
- before_install :
21
- - docker pull ipfs/go-ipfs:master
22
- - mkdir /tmp/ipfs && chmod 0777 /tmp/ipfs
23
- - docker run -d -v /tmp/ipfs:/data/ipfs -p 8080:8080 -p 4001:4001 -p 5001:5001 ipfs/go-ipfs:master --enable-pubsub-experiment
24
-
25
-
26
- # disable travis install
27
- install :
28
- - true
9
+ before_script :
10
+ - go vet ./...
11
+ - go build ./...
12
+ - go test -run xxxx ./...
13
+ - make testenv
29
14
30
15
script :
31
- - go get -d -t github.com/cheekybits/is/... # remove with gx
32
- - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh)
33
-
16
+ - go test -race -failfast -coverprofile=coverage.txt ./...
34
17
35
- cache :
36
- directories :
37
- - $GOPATH/src/gx
38
- - $GOPATH/pkg/mod
39
- - $HOME/.cache/go-build
18
+ after_success :
19
+ - bash <(curl -s https://codecov.io/bash)
40
20
41
21
notifications :
42
22
email : false
Original file line number Diff line number Diff line change 1
- all : deps
2
- gx :
3
- go get github.com/whyrusleeping/gx
4
- go get github.com/whyrusleeping/gx-go
5
- deps : gx
6
- gx --verbose install --global
7
- gx-go rewrite
8
- .PHONY : all gx deps
1
+ GO =env GO111MODULE=on go
2
+ GONOMOD =env GO111MODULE=off go
9
3
4
+ .PHONY : deps
5
+ deps :
6
+ $(GO ) mod vendor
7
+ $(GO ) mod verify
8
+
10
9
# Set up test environment
11
10
.PHONY : testenv
12
11
WAIT =3
13
12
testenv :
14
13
@echo " =================== preparing test env ==================="
15
14
( cd testenv ; make testenv )
16
15
@echo " =================== done ==================="
16
+
17
+ .PHONY : clean
18
+ clean :
19
+ @echo " =================== stopping test env ==================="
20
+ ( cd testenv ; make clean )
21
+ @echo " =================== done ==================="
You can’t perform that action at this time.
0 commit comments