-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use go-version-file to specify the go version
Signed-off-by: Phoeniix Zhao <[email protected]>
- Loading branch information
1 parent
61cf4ca
commit 5161292
Showing
2 changed files
with
4 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,6 @@ on: | |
pull_request: | ||
branches: [main] | ||
|
||
env: | ||
GO_VERSION: '1.21' | ||
|
||
jobs: | ||
format: | ||
name: Format | ||
|
@@ -20,7 +17,7 @@ jobs: | |
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{env.GO_VERSION}} | ||
go-version-file: go.mod | ||
|
||
- name: Format code | ||
uses: iamnotaturtle/[email protected] | ||
|
@@ -38,7 +35,7 @@ jobs: | |
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{env.GO_VERSION}} | ||
go-version-file: go.mod | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
|
@@ -55,7 +52,7 @@ jobs: | |
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{env.GO_VERSION}} | ||
go-version-file: go.mod | ||
|
||
- name: Build and test | ||
run: make test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters