Skip to content

Commit da55f0b

Browse files
authored
Merge pull request #551 from KevFan/issues/549
gha: use go version from go.mod
2 parents 21d456d + 61ae514 commit da55f0b

File tree

4 files changed

+34
-35
lines changed

4 files changed

+34
-35
lines changed

.github/workflows/code-style.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,21 @@ jobs:
3737
- gofmt
3838

3939
include:
40-
- tool: gofmt
41-
options: -s
42-
- tool: goimports
43-
importpath: golang.org/x/tools/cmd/goimports@latest
40+
- tool: gofmt
41+
options: -s
42+
- tool: goimports
43+
importpath: golang.org/x/tools/cmd/goimports@latest
4444

4545
steps:
46-
- name: Set up Go 1.23.x
46+
- name: Check out code
47+
uses: actions/checkout@v4
48+
49+
- name: Set up Go
4750
uses: actions/setup-go@v4
4851
with:
49-
go-version: 1.23.x
52+
go-version-file: go.mod
5053
id: go
5154

52-
- name: Check out code
53-
uses: actions/checkout@v3
54-
5555
- name: Install Dependencies
5656
if: ${{ matrix.importpath != '' }}
5757
run: |
@@ -91,15 +91,15 @@ jobs:
9191
runs-on: ubuntu-latest
9292

9393
steps:
94-
- name: Set up Go 1.23.x
94+
- name: Check out code
95+
uses: actions/checkout@v4
96+
97+
- name: Set up Go
9598
uses: actions/setup-go@v4
9699
with:
97-
go-version: 1.23.x
100+
go-version-file: go.mod
98101
id: go
99102

100-
- name: Check out code
101-
uses: actions/checkout@v3
102-
103103
- name: Install Tools
104104
env:
105105
WOKE_VERSION: v0.4.1

.github/workflows/e2e-test.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,24 @@ jobs:
1313
name: End-to-end Tests
1414
strategy:
1515
matrix:
16-
go-version: [1.23.x]
17-
platform: [ubuntu-latest]
18-
authconfig_version: [v1beta2, v1beta3]
16+
platform: [ ubuntu-latest ]
17+
authconfig_version: [ v1beta2, v1beta3 ]
1918
runs-on: ${{ matrix.platform }}
2019
defaults:
2120
run:
2221
shell: bash
2322
steps:
24-
- name: Set up Go ${{ matrix.go-version }}
23+
- name: Check out code
24+
uses: actions/checkout@v4
25+
with:
26+
ref: ${{ github.sha }}
27+
- name: Set up Go
2528
uses: actions/setup-go@v4
2629
with:
27-
go-version: ${{ matrix.go-version }}
30+
go-version-file: go.mod
2831
id: go
2932
- name: Install jq
3033
run: sudo apt-get install jq
31-
- name: Check out code
32-
uses: actions/checkout@v3
33-
with:
34-
ref: ${{ github.sha }}
3534
- name: Run make e2e
3635
env:
3736
OPERATOR_VERSION: ${{ github.event.inputs.operatorVersion }}

.github/workflows/go-test.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@ jobs:
1515
name: Unit Tests
1616
strategy:
1717
matrix:
18-
go-version: [1.23.x]
19-
platform: [ubuntu-latest]
18+
platform: [ ubuntu-latest ]
2019
runs-on: ${{ matrix.platform }}
2120
defaults:
2221
run:
2322
shell: bash
2423
steps:
25-
- name: Set up Go ${{ matrix.go-version }}
24+
- name: Check out code
25+
uses: actions/checkout@v4
26+
- name: Set up Go
2627
uses: actions/setup-go@v4
2728
with:
28-
go-version: ${{ matrix.go-version }}
29+
go-version-file: go.mod
2930
id: go
30-
- name: Check out code
31-
uses: actions/checkout@v3
3231
- name: Run make test
3332
run: |
3433
make test

.github/workflows/smoke-test.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,28 @@ name: Smoke Tests
33
on:
44
workflow_run:
55
workflows:
6-
- Build and push image
6+
- Build and push image
77
types:
8-
- completed
8+
- completed
99

1010
jobs:
1111
on-success:
1212
name: Smoke Tests
1313
strategy:
1414
matrix:
15-
go-version: [1.23.x]
16-
platform: [ubuntu-latest]
15+
platform: [ ubuntu-latest ]
1716
runs-on: ${{ matrix.platform }}
1817
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1918
defaults:
2019
run:
2120
shell: bash
2221
steps:
23-
- name: Set up Go ${{ matrix.go-version }}
22+
- name: Check out code
23+
uses: actions/checkout@v4
24+
- name: Set up Go
2425
uses: actions/setup-go@v4
2526
with:
26-
go-version: ${{ matrix.go-version }}
27+
go-version-file: go.mod
2728
id: go
2829
- name: Install jq
2930
run: sudo apt-get install jq

0 commit comments

Comments
 (0)