Skip to content

Commit

Permalink
feat(deps)!: upgrade minimum Go version to 1.18 (from 1.16)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimeh committed Oct 13, 2023
1 parent 38c5d30 commit f2a4ea9
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 24 deletions.
File renamed without changes.
File renamed without changes.
34 changes: 13 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.18
cache: false
- uses: actions/cache@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golangcilint-${{ hashFiles('**/Makefile') }}
restore-keys: |
${{ runner.os }}-golangcilint-
- name: Lint with golangci-lint
run: make lint
version: v1.54
env:
GOLANGCILINTARGS: --out-format=github-actions
VERBOSE: "true"

tidy:
name: Tidy
Expand All @@ -32,7 +26,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: 1.18
- name: Check if mods are tidy
run: make check-tidy

Expand All @@ -43,7 +37,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: 1.18
- name: Check if generate results are up to date
run: make check-generate

Expand All @@ -54,7 +48,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.16
go-version: 1.18
- name: Publish coverage
uses: paambaati/codeclimate-action@v4.0.0
env:
Expand All @@ -76,11 +70,10 @@ jobs:
- ubuntu-latest
- macos-latest
go_version:
- "1.16"
- "1.17"
- "1.18"
- "1.19"
- "1.20"
- "1.21"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -98,11 +91,10 @@ jobs:
if: github.ref == 'refs/heads/main'
outputs:
release_created: ${{ steps.release-please.outputs.release_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }} # e.g. v1.0.0
version: ${{ steps.release-please.outputs.version }} # e.g. 1.0.0
all: ${{ toJSON(steps.release-please.outputs) }}
version: ${{ steps.release-please.outputs.version }}
steps:
- uses: google-github-actions/release-please-action@v3
- uses: krystal/release-please-manifest-action@v1
id: release-please
with:
command: manifest
app-id: ${{ vars.RELEASE_PLEASE_GITHUB_APP_ID }}
private-key: ${{ secrets.RELEASE_PLEASE_GITHUB_APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ endef
$(eval $(call tool,godoc,golang.org/x/tools/cmd/godoc@latest))
$(eval $(call tool,gofumpt,mvdan.cc/gofumpt@latest))
$(eval $(call tool,goimports,golang.org/x/tools/cmd/goimports@latest))
$(eval $(call tool,golangci-lint,github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52))
$(eval $(call tool,golangci-lint,github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54))
$(eval $(call tool,gomod,github.com/Helcaraxan/gomod@latest))
$(eval $(call tool,mockgen,github.com/golang/mock/mockgen@v1.6.0))

Expand Down
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
module github.com/krystal/go-runner

go 1.16
go 1.18

require (
github.com/golang/mock v1.6.0
github.com/romdo/gomockctx v0.1.0
github.com/stretchr/testify v1.7.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
2 changes: 1 addition & 1 deletion runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"os/exec"
)

//go:generate mockgen -source=$GOFILE -destination=mock/${GOFILE}
//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -source=$GOFILE -destination=mock/${GOFILE}

// Runner is the interface that all runner structs implements. It makes it easy
// to replace the underlying command runner with a mock for testing, or a
Expand Down

0 comments on commit f2a4ea9

Please sign in to comment.