Skip to content

Commit

Permalink
ci: use go-version-file to specify the go version
Browse files Browse the repository at this point in the history
Signed-off-by: Phoeniix Zhao <[email protected]>
  • Loading branch information
Phoenix500526 committed Jan 10, 2024
1 parent 61cf4ca commit 5161292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [main]

env:
GO_VERSION: '1.21'

jobs:
format:
name: Format
Expand All @@ -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]
Expand All @@ -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
Expand All @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go/src/github.com/${{ github.repository }}/go.mod
go-version: 1.21.3
go-version-file: go.mod
- name: 'E2E CI'
run: bash ./tests/e2e/e2e.sh -p ci
- name: clean
Expand Down

0 comments on commit 5161292

Please sign in to comment.