-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.travis.yml
66 lines (61 loc) · 1.66 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
language: go
go_import_path: github.com/simplechain-org/go-simplechain
jobs:
allow_failures:
- stage: build
os: osx
go: 1.13.x
include:
# This builder only tests code linters on go 1.13.x
- stage: lint
os: linux
dist: xenial
go: 1.13.x
env:
- lint
git:
submodules: false # avoid cloning simplechain/tests
script:
- go run build/ci.go lint
# go latest, linux
- stage: build
os: linux
dist: xenial
go: 1.14.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES
# go 1.13.x, linux, merge
- stage: build
if: type = pull_request
os: linux
arch: amd64
dist: xenial
go: 1.13.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES
# go 1.13.x, mac, merge
- stage: build
if: type = pull_request
os: osx
osx_image: xcode11.3
go: 1.13.x
env:
- GO111MODULE=on
script:
- go run build/ci.go install
- go run build/ci.go test -coverage $TEST_PACKAGES
deploy:
- provider: script
script: docker run -e GITHUB_TOKEN=$GITHUB_TOKEN --rm --privileged -v $TRAVIS_BUILD_DIR:/go/src/github.com/simplechain-org/go-simplechain -v /var/run/docker.sock:/var/run/docker.sock -w /go/src/github.com/simplechain-org/go-simplechain mailchain/goreleaser-xcgo --rm-dist
skip_cleanup: true
on:
tags: true
repo: simplechain-org/go-simplechain
branch: master
condition: $DEPLOY = true