forked from 33cn/plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (69 loc) · 2.03 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
67
68
69
70
71
72
73
74
language: go
go_import_path: github.com/33cn/plugin
os: linux
dist: xenial
notifications:
email: false
matrix:
include:
- name: check_fmt
sudo: require
go: "1.15.x"
env:
- GO111MODULE=on
install:
- go get -u golang.org/x/tools/cmd/goimports
- go get github.com/golangci/golangci-lint/cmd/[email protected]
- go get -u mvdan.cc/sh/cmd/shfmt
- go get -u mvdan.cc/sh/cmd/gosh
script:
- make checkgofmt && make fmt_go
- make linter
- name: unit-test
go: "1.15.x"
env:
- GO111MODULE=on
install: skip
script:
- make test
- name: coverage
if: branch = master
go: "1.15.x"
env:
- GO111MODULE=on
before_install:
- go get -t -v ./...
install: skip
script:
- make coverage
after_success:
- bash <(curl -s https://codecov.io/bash)
- name: auto-test
go: "1.15.x"
env:
- GO111MODULE=on
install: skip
before_script: make build_ci
script:
- make autotest dapp=all
- name: deploy
if: env(DAPP) IS present
sudo: required
services:
- docker
go: "1.15.x"
env:
- DOCKER_COMPOSE_VERSION=1.21.2
- GO111MODULE=on
install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
before_script: make build_ci
script:
- make docker-compose dapp=${DAPP} && make docker-compose-down dapp=${DAPP} && make clean