Skip to content

Commit

Permalink
bump go version (#1797)
Browse files Browse the repository at this point in the history
* bump go version
* cleanup pipeline
  • Loading branch information
ubogdan committed Apr 20, 2024
1 parent 90aa46f commit 8a47dcb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 36 deletions.
23 changes: 2 additions & 21 deletions .github/workflows/ci.yml
Expand Up @@ -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)
13 changes: 1 addition & 12 deletions Makefile
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README_pt.md
Expand Up @@ -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).

Expand Down
2 changes: 1 addition & 1 deletion README_zh-CN.md
Expand Up @@ -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页面下载预编译好的二进制文件。

Expand Down

0 comments on commit 8a47dcb

Please sign in to comment.