Skip to content

Commit

Permalink
Refined azure pipeline, and fixed various of compile errors (#271)
Browse files Browse the repository at this point in the history
* 1. Move from dep to modules

2. Use golangci-lint instead of gometalinter

3. Fixed various of compilation errors

4. Remove the travis pipeline config file

5. Refined azure pipeline config

* Stop using Makefile

* Revert changes on test scripts

* Refactor pipeline
  • Loading branch information
ArcturusZhang authored Mar 10, 2020
1 parent 86c76a3 commit 13286d0
Show file tree
Hide file tree
Showing 93 changed files with 976 additions and 1,590 deletions.
9 changes: 9 additions & 0 deletions .azure-pipelines/lint_and_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
jobs:
- job:
pool:
vmImage: 'Ubuntu 18.04'

steps:
- template: steps/init_workspace.yml
- template: steps/linter_check.yml
- template: steps/build_test.yml
3 changes: 3 additions & 0 deletions .azure-pipelines/steps/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
steps:
- script: go build -v $(go list ./...)
displayName: 'Build'
13 changes: 13 additions & 0 deletions .azure-pipelines/steps/init_workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
steps:
- script: |
mkdir -p $GOPATH
mkdir -p '$(GOPATH)/bin'
shopt -s dotglob extglob
echo '##vso[task.prependpath]$(GOROOT)/bin'
echo '##vso[task.prependpath]$(GOPATH)/bin'
displayName: 'Create Go Workspace'
- script: |
go version
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6
golangci-lint --version
displayName: 'Install Dependencies'
10 changes: 10 additions & 0 deletions .azure-pipelines/steps/linter_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
steps:
- script: |
golangci-lint run --timeout=30m --disable-all \
--enable=deadcode --enable=gocyclo --enable=golint \
--enable=varcheck --enable=structcheck --enable=maligned \
--enable=ineffassign --enable=interfacer --enable=unconvert \
--enable=goconst --enable=gosec ./... >&2
displayName: 'Linter Check'
failOnStderr: true
condition: succeededOrFailed()
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 13286d0

Please sign in to comment.