forked from hyperjumptech/grule-rule-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
35 lines (33 loc) · 1.24 KB
/
azure-pipelines.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
trigger:
- master
variables:
GO111MODULE: 'on'
GOBIN: '$(GOPATH)/bin' # Go binaries path
GOROOT: '/usr/local/go1.13' # Go installation path
GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
modulePath: '$(GOPATH)/src/github.com/hyperjumptech/grule' # Path to the module's code
steps:
- script: |
mkdir -p '$(GOBIN)'
mkdir -p '$(GOPATH)/pkg'
mkdir -p '$(modulePath)'
shopt -s extglob
mv !(gopath) '$(modulePath)'
echo '##vso[task.prependpath]$(GOBIN)'
echo '##vso[task.prependpath]$(GOROOT)/bin'
echo '##vso[task.setvariable variable=path]$(PATH):$(GOBIN)'
displayName: 'Set up the Go workspace'
- script: go get -v -t -d ./...
workingDirectory: '$(modulePath)'
displayName: 'go get dependencies'
- script: go build -v ./...
workingDirectory: '$(modulePath)'
displayName: 'Build'
- script: |
go get -u golang.org/x/lint/golint
go install github.com/newm4n/goornogo
go test ./... -v -covermode=count -coverprofile=coverage.out -short
goornogo -i coverage.out -c 45.3
golint -set_exit_status builder/... engine/... examples/... ast/... pkg/... antlr/. model/...
workingDirectory: '$(modulePath)'
displayName: 'Run tests'