Skip to content

Commit

Permalink
chore(CI): add GitHub action (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
ubogdan authored and easonlin404 committed Dec 1, 2019
1 parent de444e5 commit d6d8b49
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,29 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@master
with:
path: ./src/github.com/${{ github.repository }}
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
- name: deps
run: make deps
run: make deps
env:
GOPATH: ${{ runner.workspace }}
- name: static program analysis
run: |
export PATH=$PATH:$(go env GOPATH)/bin # https://github.com/actions/setup-go/issues/14
mkdir -p $(go env GOPATH)/src/github.com/swaggo
ln -s $(pwd) $(go env GOPATH)/src/github.com/swaggo/swag
make fmt-check lint vet
env:
GOPATH: ${{ runner.workspace }}
- name: build
run: make build
env:
GOPATH: ${{ runner.workspace }}
- name: test
run: make test
env:
GOPATH: ${{ runner.workspace }}
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ deps:
$(GOGET) github.com/go-openapi/spec
$(GOGET) github.com/stretchr/testify/assert
$(GOGET) github.com/alecthomas/template
$(GOGET) golang.org/x/tools/go/loader

.PHONY: devel-deps
devel-deps:
Expand Down
1 change: 0 additions & 1 deletion testdata/pare_outside_dependencies/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
// @host petstore.swagger.io
// @BasePath /v2
func main() {
_ := web.Pet{}
r := gin.New()
r.GET("/testapi/get-string-by-int/:some_id", api.GetStringByInt)
r.GET("//testapi/get-struct-array-by-string/:some_id", api.GetStructArrayByString)
Expand Down

0 comments on commit d6d8b49

Please sign in to comment.