Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: utilize go version from go.mod #71

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ name: lint
on:
workflow_call:

env:
GO_VERSION: '1.21.1'

jobs:
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: ./go.mod

- uses: technote-space/[email protected]
with:
# This job will pass without running if go.mod, go.sum, and *.go
Expand All @@ -23,6 +22,7 @@ jobs:
**/**.go
go.mod
go.sum

- uses: golangci/[email protected]
with:
version: v1.55.2
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: test
on:
workflow_call:

env:
GO_VERSION: '1.21.1'

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -13,7 +10,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: ./go.mod

- name: Run tests
run: go test ./... -v -timeout 5m -race
Loading