Skip to content

Commit

Permalink
feat: support minimum go version 1.17 (#2)
Browse files Browse the repository at this point in the history
Signed-off-by: ZhangJian He <shoothzj@gmail.com>
  • Loading branch information
ZhangJian He authored Oct 10, 2024
1 parent 526d5c4 commit f299adf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go_ci_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.18'
go-version: '1.17'
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/go_mod_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.18'
- name: Run Go Mod Check Action
uses: shoothzj/go-mod-check-action@main
with:
prohibitIndirectDepUpdate: 'true'
go-version: '1.17'
- name: build go mod check
run: go build .
- name: run go mod check
run: export PROHIBIT_INDIRECT_DEP_UPDATE=true;./go-mod-check-action
2 changes: 1 addition & 1 deletion .github/workflows/go_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.18'
go-version: '1.17'
- name: Run coverage
run: go test ./... -race -coverprofile=coverage.out -covermode=atomic
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
This GitHub Action checks if your `go.mod` and `go.sum` files are properly updated and optionally prevents indirect
dependency updates.

## Requirements

- Go 1.17+

## Features

1. Runs `go mod tidy` to check if `go.mod` and `go.sum` files have any changes. If there are changes, the action fails.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module go-mod-check-action

go 1.18
go 1.17

require github.com/pmezard/go-difflib v1.0.0

0 comments on commit f299adf

Please sign in to comment.