diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a847dae9..9f92be356 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,41 +10,22 @@ jobs: test: strategy: matrix: - go: [ '1.18.x', '1.19.x', '1.20.x', '1.21.x' ] + go: [ '1.19.x', '1.20.x', '1.21.x', '1.22.x' ] platform: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 - with: - path: ./src/github.com/${{ github.repository }} - name: Set up Go uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} - name: deps - working-directory: ./src/github.com/${{ github.repository }} run: make deps - env: - GOPATH: ${{ runner.workspace }} - name: static program analysis - working-directory: ./src/github.com/${{ github.repository }} - 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 }} + run: make fmt-check vet - name: build run: make build - working-directory: ./src/github.com/${{ github.repository }} - env: - GOPATH: ${{ runner.workspace }} - name: test - working-directory: ./src/github.com/${{ github.repository }} run: make test - env: - GOPATH: ${{ runner.workspace }} - name: coverage - working-directory: ./src/github.com/${{ github.repository }} run: bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index 0d8175da7..85dc36235 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,6 @@ BINARY_NAME:=swag PACKAGES:=$(shell $(GOLIST) github.com/swaggo/swag github.com/swaggo/swag/cmd/swag github.com/swaggo/swag/gen github.com/swaggo/swag/format) GOFILES:=$(shell find . -name "*.go" -type f) -export GO111MODULE := on - all: test build .PHONY: build @@ -57,17 +55,8 @@ clean: deps: $(GOMODTIDY) -.PHONY: devel-deps -devel-deps: - GO111MODULE=off $(GOGET) -v -u \ - golang.org/x/lint/golint - -.PHONY: lint -lint: devel-deps - for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done; - .PHONY: vet -vet: deps devel-deps +vet: deps $(GOVET) $(PACKAGES) .PHONY: fmt diff --git a/README.md b/README.md index 054e36ec6..5e402a918 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Swag converts Go annotations to Swagger Documentation 2.0. We've created a varie ```sh go install github.com/swaggo/swag/cmd/swag@latest ``` -To build from source you need [Go](https://golang.org/dl/) (1.18 or newer). +To build from source you need [Go](https://golang.org/dl/) (1.19 or newer). Alternatively you can run the docker image: ```sh diff --git a/README_pt.md b/README_pt.md index 7f95066bb..060b2c970 100644 --- a/README_pt.md +++ b/README_pt.md @@ -54,7 +54,7 @@ Swag converte anotações Go para Documentação Swagger 2.0. Criámos uma varie ```sh go install github.com/swaggo/swag/cmd/swag@latest ``` -Para construir a partir da fonte é necessário [Go](https://golang.org/dl/) (1.18 ou mais recente). +Para construir a partir da fonte é necessário [Go](https://golang.org/dl/) (1.19 ou mais recente). Ou descarregar um binário pré-compilado a partir da [página de lançamento](https://github.com/swaggo/swag/releases). diff --git a/README_zh-CN.md b/README_zh-CN.md index 87d600b52..2b3d9d2a2 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -50,7 +50,7 @@ Swag将Go的注释转换为Swagger2.0文档。我们为流行的 [Go Web Framewo go install github.com/swaggo/swag/cmd/swag@latest ``` -从源码开始构建的话,需要有Go环境(1.18及以上版本)。 +从源码开始构建的话,需要有Go环境(1.19及以上版本)。 或者从github的release页面下载预编译好的二进制文件。