Skip to content

Commit

Permalink
ci: setup go version using go.mod file (#653)
Browse files Browse the repository at this point in the history
Use the `go.mod` file to determine the version of go to run in CI.
  • Loading branch information
jooola authored May 31, 2024
1 parent 45ac40a commit 77438db
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: go.mod

- run: go test -v -race -coverprofile=coverage.txt ./...

Expand All @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: go.mod

- uses: golangci/golangci-lint-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version-file: go.mod

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/test_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ jobs:
CERT_DOMAIN: hc-integrations-test.de

steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.21"
- uses: actions/checkout@master
go-version-file: go.mod

- uses: hetznercloud/setup-hcloud@v1

- uses: hetznercloud/tps-action@main
with:
token: ${{ secrets.HCLOUD_TOKEN }}
- uses: hetznercloud/setup-hcloud@v1

- uses: yokawasa/action-setup-kube-tools@v0.11.1
with:
setup-tools: |
Expand Down Expand Up @@ -131,14 +135,18 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.21"
- uses: actions/checkout@master
go-version-file: go.mod

- uses: hetznercloud/setup-hcloud@v1

- uses: hetznercloud/tps-action@main
with:
token: ${{ secrets.HCLOUD_TOKEN }}
- uses: hetznercloud/setup-hcloud@v1

- uses: yokawasa/action-setup-kube-tools@v0.11.1
with:
setup-tools: |
Expand Down

0 comments on commit 77438db

Please sign in to comment.