Merge pull request #44 from status-im/ci/add-jenkinsfile

ci: add Jenkinsfile that runs lint and test targets
This commit is contained in:
Jakub 2021-08-16 17:13:09 +02:00 committed by GitHub
commit d1835fd612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 1 deletions

35
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,35 @@
pipeline {
agent {
label 'linux'
}
options {
timestamps()
buildDiscarder(logRotator(
numToKeepStr: '10',
daysToKeepStr: '30',
))
}
environment {
GOPATH = "${env.HOME}/go"
PATH = "${env.PATH}:${env.GOPATH}/bin"
}
stages {
stage('Deps') {
steps { sh 'make deps' }
}
stage('Lint') {
steps { sh 'make lint' }
}
stage('Test') {
steps { sh 'make test' }
}
}
post {
always { cleanWs() }
}
}

View File

@ -2,12 +2,17 @@
all: build
deps: lint-install
build:
go build -o build/waku waku.go
lint-install:
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | \
bash -s -- -b $(shell go env GOPATH)/bin v1.41.1
lint:
@echo "lint"
@golangci-lint --exclude=SA1019 run ./... --deadline=5m
test:
go test -v -failfast ./...