Skip to content

Commit

Permalink
Bump GHA testing workflows to honor .go-version file
Browse files Browse the repository at this point in the history
  • Loading branch information
nywilken committed Nov 1, 2022
1 parent 2bbf373 commit f80c21a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/go-test-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ permissions:
jobs:
get-go-version:
runs-on: ubuntu-latest
outputs:
go-version: ${{ steps.get-go-version.outputs.go-version }}
steps:
- uses: actions/checkout@v2
- name: 'Determine Go version'
Expand All @@ -21,6 +23,8 @@ jobs:
echo "Building with Go $(cat .go-version)"
echo "::set-output name=go-version::$(cat .go-version)"
darwin-go-tests:
needs:
- get-go-version
runs-on: macos-latest
name: Darwin Go tests
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/go-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ permissions:
jobs:
get-go-version:
runs-on: ubuntu-latest
outputs:
go-version: ${{ steps.get-go-version.outputs.go-version }}
steps:
- uses: actions/checkout@v2
- name: 'Determine Go version'
Expand All @@ -21,6 +23,8 @@ jobs:
echo "Building with Go $(cat .go-version)"
echo "::set-output name=go-version::$(cat .go-version)"
Linux-go-tests:
needs:
- get-go-version
runs-on: ubuntu-latest
name: Linux Go tests
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/go-test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ permissions:
jobs:
get-go-version:
runs-on: ubuntu-latest
outputs:
go-version: ${{ steps.get-go-version.outputs.go-version }}
steps:
- uses: actions/checkout@v2
- name: 'Determine Go version'
Expand All @@ -21,6 +23,8 @@ jobs:
echo "Building with Go $(cat .go-version)"
echo "::set-output name=go-version::$(cat .go-version)"
windows-go-tests:
needs:
- get-go-version
runs-on: windows-latest
name: Windows Go tests
steps:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/go-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
echo "Building with Go $(cat .go-version)"
echo "::set-output name=go-version::$(cat .go-version)"
check-mod-tidy:
needs:
- get-go-version
runs-on: ubuntu-latest
name: Go Mod Tidy
steps:
Expand All @@ -31,6 +33,8 @@ jobs:
go-version: ${{ needs.get-go-version.outputs.go-version }}
- run: go mod tidy
check-lint:
needs:
- get-go-version
runs-on: ubuntu-latest
name: Lint check
steps:
Expand All @@ -43,6 +47,8 @@ jobs:
version: v1.47.3
only-new-issues: true
check-fmt:
needs:
- get-go-version
runs-on: ubuntu-latest
name: Gofmt check
steps:
Expand All @@ -59,6 +65,8 @@ jobs:
exit 1; \
fi
check-generate:
needs:
- get-go-version
runs-on: ubuntu-latest
name: Generate check
steps:
Expand Down

0 comments on commit f80c21a

Please sign in to comment.