add Jenkinsfile for tests

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-03-27 13:17:25 +01:00 committed by Jakub
parent 86c5ba953a
commit bbc3c9ef8c
2 changed files with 43 additions and 0 deletions

View File

@ -1,4 +1,7 @@
.PHONY: test
deps:
go get -t ./...
test:
go test -v ./...

40
_assets/ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,40 @@
pipeline {
agent {
docker {
label 'linux'
image 'golang:1.12'
}
}
options {
/* manage how many builds we keep */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
disableConcurrentBuilds()
/* Go requires a certain directory structure */
checkoutToSubdirectory('src/github.com/status-im/keycard-go')
}
environment {
PROJECT = 'src/github.com/status-im/keycard-go'
GOPATH = "${env.WORKSPACE}"
PATH = "${env.PATH}:${env.GOPATH}/bin"
GOCACHE = '/tmp/gocache'
}
stages {
stage('Prep') {
steps { dir(env.PROJECT) {
sh 'make deps'
} }
}
stage('Test') {
steps { dir(env.PROJECT) {
sh 'make test'
} }
}
}
}