Skip to content

Commit

Permalink
Normalize go version
Browse files Browse the repository at this point in the history
This makes the test workflow use a normalized Go version, so updating
this should be easier.
  • Loading branch information
ifosch committed Oct 8, 2023
1 parent f8d4193 commit be7920e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
branches:
- master

env:
GO_VERSION: '^1.16'

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -11,7 +14,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Prepare coverage
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
tags:
- '*'

env:
GO_VERSION: '^1.16'

jobs:
docker:
runs-on: ubuntu-latest
Expand All @@ -11,7 +14,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Get tag name
id: tag_name
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
on: [pull_request]

env:
GO_VERSION: '^1.16'

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -8,7 +11,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Prepare coverage
run: |
Expand Down Expand Up @@ -58,7 +61,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Check code smells
run: |
Expand All @@ -70,7 +73,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Install gocyclo
run: |
Expand All @@ -89,7 +92,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Install golint
run: |
Expand All @@ -108,7 +111,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Install ineffassign
run: |
Expand All @@ -131,7 +134,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Install spellchecker
run: |
Expand All @@ -150,7 +153,7 @@ jobs:
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
go-version: ${{ env.GO_VERSION }}
-
name: Install staticcheck
run: |
Expand Down

0 comments on commit be7920e

Please sign in to comment.