Skip to content

Commit

Permalink
tests: use version from go.mod in github actions
Browse files Browse the repository at this point in the history
This reduces the duplication of the go version.
  • Loading branch information
justinsb committed May 9, 2024
1 parent 00f7899 commit a467507
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
build-linux-amd64:
runs-on: ubuntu-20.04
steps:
- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: '1.22.3'

- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
with:
path: ${{ env.GOPATH }}/src/k8s.io/kops

- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version-file: '${{ env.GOPATH }}/src/k8s.io/kops/go.mod'

- name: make all examples test
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops
run: |
Expand All @@ -33,15 +33,15 @@ jobs:
build-macos-amd64:
runs-on: macos-latest
steps:
- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: '1.22.3'

- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
with:
path: ${{ env.GOPATH }}/src/k8s.io/kops

- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version-file: '${{ env.GOPATH }}/src/k8s.io/kops/go.mod'

- name: make kops examples test
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops
run: |
Expand All @@ -50,15 +50,15 @@ jobs:
build-windows-amd64:
runs-on: windows-2019
steps:
- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: '1.22.3'

- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
with:
path: ${{ env.GOPATH }}/src/k8s.io/kops

- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version-file: '${{ env.GOPATH }}/src/k8s.io/kops/go.mod'

- name: make kops examples test
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops
run: |
Expand All @@ -67,15 +67,15 @@ jobs:
verify:
runs-on: ubuntu-20.04
steps:
- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: '1.22.3'

- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
with:
path: ${{ env.GOPATH }}/src/k8s.io/kops

- name: Set up go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version-file: '${{ env.GOPATH }}/src/k8s.io/kops/go.mod'

- name: make quick-ci
working-directory: ${{ env.GOPATH }}/src/k8s.io/kops
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ jobs:
if: ${{ github.repository == 'kubernetes/kops' }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b

- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: '1.22.3'
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
go-version-file: 'go.mod'

- name: Update Dependencies
id: update_deps
run: |
Expand Down

0 comments on commit a467507

Please sign in to comment.