Skip to content

Commit 8869a33

Browse files
author
potsables
committed
chore: update makefile, travis
1 parent 2da9846 commit 8869a33

File tree

2 files changed

+25
-40
lines changed

2 files changed

+25
-40
lines changed

.travis.yml

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,22 @@
1-
os:
2-
- linux
3-
41
language: go
5-
2+
sudo: required
63
go:
7-
- 1.11.x
8-
4+
- "1.12"
95
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
198

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
2914

3015
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 ./...
3417

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)
4020

4121
notifications:
4222
email: false

Makefile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
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
93

4+
.PHONY: deps
5+
deps:
6+
$(GO) mod vendor
7+
$(GO) mod verify
8+
109
# Set up test environment
1110
.PHONY: testenv
1211
WAIT=3
1312
testenv:
1413
@echo "=================== preparing test env ==================="
1514
( cd testenv ; make testenv )
1615
@echo "=================== done ==================="
16+
17+
.PHONY: clean
18+
clean:
19+
@echo "=================== stopping test env ==================="
20+
( cd testenv ; make clean )
21+
@echo "=================== done ==================="

0 commit comments

Comments
 (0)