未验证 提交 33900add 编写于 作者: LinuxSuRen's avatar LinuxSuRen 提交者: GitHub

Add travis and sonar project property file (#127)

* Add travis and sonar project property file

* Add blank line

* Fix the error when execute test because of no bin dir

* Add language setting

* Add env set for go module

* Add dist trusty

* Change test report file
上级 be428e89
language: go
dist: trusty
go:
- 1.12.x
env:
global:
- GO111MODULE=on
addons:
sonarcloud:
organization: "jenkins-zh"
token:
secure: 3caad1285eb0edf2b4f65ee07b3cd8edde6c5176 # encrypted value of your token
script:
- make clean
# Execute some tests
- make test
# And finally run the SonarQube analysis - read the "sonar-project.properties"
# file to see the specific configuration
- curl -LsS https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.0.0.1744-linux.zip > sonar-scanner-cli-4.0.0.1744-linux.zip
- unzip sonar-scanner-cli-4.0.0.1744-linux.zip
- sonar-scanner-4.0.0.1744-linux/bin/sonar-scanner -Dsonar.projectKey=jenkins-zh_jenkins-cli -Dsonar.organization=jenkins-zh -Dsonar.sources=. -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=674e187e300edc0ad56a05705bd0b21cbe18bd52
......@@ -35,9 +35,8 @@ copy: darwin
sudo cp bin/darwin/$(NAME) $(shell which jcli)
test:
go test ./util/... -v -coverprofile bin/testcover-util.log
go test ./client/... -v -coverprofile bin/testcover-client.log
go test ./app/... -v -coverprofile bin/testcover-app.log
mkdir -p bin
go test ./... -v -coverprofile coverage.out
dep:
go get github.com/AlecAivazis/survey/v2
......
sonar.projectKey=jenkins-zh_jenkins-cli
# this is the name and version displayed in the SonarCloud UI.
sonar.projectName=jenkins-cli
sonar.projectVersion=1.0
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=.
# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册