Skip to content

Commit 9f3524b

Browse files
authored
Merge pull request #716 from henrybear327/feat/introduce-go-version-file
Adopt the .go-version approach for toolchain versioning
2 parents 50aef26 + 67a2678 commit 9f3524b

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/failpoint_test.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ jobs:
99
runs-on: ${{ matrix.os }}
1010
steps:
1111
- uses: actions/checkout@v3
12+
- id: goversion
13+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
1214
- uses: actions/setup-go@v3
1315
with:
14-
go-version: "1.17.13"
16+
go-version: ${{ steps.goversion.outputs.goversion }}
1517
- run: |
1618
make gofail-enable
1719
make test-failpoint

.github/workflows/tests.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v3
16+
- id: goversion
17+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
1618
- uses: actions/setup-go@v3
1719
with:
18-
go-version: "1.17.13"
20+
go-version: ${{ steps.goversion.outputs.goversion }}
1921
- run: make fmt
2022
- env:
2123
TARGET: ${{ matrix.target }}
@@ -64,9 +66,11 @@ jobs:
6466
runs-on: windows-latest
6567
steps:
6668
- uses: actions/checkout@v3
69+
- id: goversion
70+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
6771
- uses: actions/setup-go@v3
6872
with:
69-
go-version: "1.17.13"
73+
go-version: ${{ steps.goversion.outputs.goversion }}
7074
- run: make fmt
7175
- env:
7276
TARGET: ${{ matrix.target }}
@@ -92,8 +96,10 @@ jobs:
9296
runs-on: ${{ matrix.os }}
9397
steps:
9498
- uses: actions/checkout@v3
99+
- id: goversion
100+
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
95101
- uses: actions/setup-go@v3
96102
with:
97-
go-version: "1.17.13"
103+
go-version: ${{ steps.goversion.outputs.goversion }}
98104
- run: make coverage
99105

.go-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.17.13

0 commit comments

Comments
 (0)