-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.travis.yml
68 lines (50 loc) · 2.09 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:
- 1.x
dist: xenial
cache: false #不使用cache
#cache: ccache
notifications:
email: false
sudo: required # 使用容器进行编译,速度更快
addons:
sonarcloud:
organization: "$SONAR_ORG"
token:
secure: "$SONAR_TOKEN_dev"
services:
- docker
git:
submodules: false # 不运行 git submodules 命令
#耗时,放到编译时的makefile中处理
before_install:
# - docker pull karalabe/xgo-latest
# - docker ps -a
# - go get github.com/karalabe/xgo
install: true # 跳过 install 阶段,因为我已经定义了 before_install。其实 go 项目是需要安装依赖的,只是我放到了下面的 make mycli 命令中做
script:
#- make travis-test # 运行测试
- go test -p 1 ./...
#script: make compile
after_script:
- go test -p 1 -cover ./... -coverprofile=coverage.out
- sonar-scanner
deploy:
- provider: script
script: bash cs.sh compile
on:
repo: dipperin/dipperin-core
branch: master
tags: true #git tag 时发布
- provider: releases
api_key:
secure: T6E/9a2nPxG4d4DKRGYh+GkeMZLLjdXwQ77DsLvaOYc0x6OgfNequcK6+CVGuO4N9UFOmRH54VJGwGq/ZVBtTpyLudQaaEJemG5bPFCkGtYJkmBDYGypPNYP1zKvGZtys7Fhqu2gWi4NVWvhK/laxwSk4K3K4sHCDONZ6y+7hcqEAA/hu023Eo+fYB+y2V7ERwAEYOlj7zZCab/uE1r0e6QMsk642Japd8mtT+iNXD9uR/VhpKRP+b1PjjRQ8aDhmxiUmMqZBN7OLWc3F3v7LAudO5WTqmdurN5FQ8wdFDF2NgzUWafxd/1zPHqj+/r8BujT3LDuDcEPmYZ5mjHnSqaak3LIrQWHtZsMv0Zo4ZajVYiIinrFjVuo542rn2L7S2+aefX+9LmM+u/uqAHWRZXNLRaEHqC8/AjseyKLhF44xTd9RpF29zTP7/snOkOcgc1afpBqcgUwUpu46P+nhs+oCO2xtMQC5PHchUwVgLopd+GjnxYhNRy3gQn6ir8S2DbJtpH432O0sHV8bAmce6AWxmoM3feXlvKUirI0o+nJM7ejetdR40qdA3FKZa8MYDEW5oHIo0Yjbl0VawnhVY7GeAZZTcdWpLPLWW7XV5BjKOx/eVAIXQcNruW4wTRjd8lLy261NBZ0Zr5/jWyFlyZ3Y540rDApJrq8mf5onNc=
file:
- "./cmd/dipperin/dipperin-linux-amd64"
- "./cmd/dipperin/dipperin-windows-4.0-amd64.exe"
- "./cmd/dipperin/dipperin-darwin-10.6-amd64"
skip_cleanup: true # 因为要上传可执行文件到 release,所以不能自动把这个文件清除
on:
repo: dipperin/dipperin-core
branch: master
tags: true #git tag 时发布