Skip to content

Commit f9c424e

Browse files
committed
chore: use go-version-file to read go-version from go.mod
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 0f8947f commit f9c424e

6 files changed

+7
-21
lines changed

.github/workflows/benchmark-template.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ jobs:
2424
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2525
with:
2626
fetch-depth: 0
27-
- id: goversion
28-
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2927
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
3028
with:
31-
go-version: ${{ steps.goversion.outputs.goversion }}
29+
go-version-file: go.mod
3230
- name: Run Benchmarks
3331
run: |
3432
BENCHSTAT_OUTPUT_FILE=result.txt make test-benchmark-compare REF=${{ inputs.benchGitRef }}

.github/workflows/failpoint_test.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ jobs:
1010
runs-on: ${{ matrix.os }}
1111
steps:
1212
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13-
- id: goversion
14-
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
1513
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
1614
with:
17-
go-version: ${{ steps.goversion.outputs.goversion }}
15+
go-version-file: go.mod
1816
- run: |
1917
make gofail-enable
2018
make test-failpoint

.github/workflows/robustness_template.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ jobs:
2424
runs-on: ${{ fromJson(inputs.runs-on) }}
2525
steps:
2626
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27-
- id: goversion
28-
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2927
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
3028
with:
31-
go-version: ${{ steps.goversion.outputs.goversion }}
29+
go-version-file: go.mod
3230
- name: test-robustness
3331
run: |
3432
set -euo pipefail

.github/workflows/tests-template.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@ jobs:
2424
runs-on: ${{ inputs.runs-on }}
2525
steps:
2626
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
27-
- id: goversion
28-
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2927
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
3028
with:
31-
go-version: ${{ steps.goversion.outputs.goversion }}
29+
go-version-file: go.mod
3230
- run: make fmt
3331
- env:
3432
TARGET: ${{ matrix.target }}

.github/workflows/tests_amd64.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21-
- id: goversion
22-
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2321
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
2422
with:
25-
go-version: ${{ steps.goversion.outputs.goversion }}
23+
go-version-file: go.mod
2624
- run: make coverage

.github/workflows/tests_windows.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ jobs:
2020
runs-on: windows-latest
2121
steps:
2222
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23-
- id: goversion
24-
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
2523
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
2624
with:
27-
go-version: ${{ steps.goversion.outputs.goversion }}
25+
go-version-file: go.mod
2826
- run: make fmt
2927
- env:
3028
TARGET: ${{ matrix.target }}
@@ -49,9 +47,7 @@ jobs:
4947
runs-on: windows-latest
5048
steps:
5149
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52-
- id: goversion
53-
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
5450
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
5551
with:
56-
go-version: ${{ steps.goversion.outputs.goversion }}
52+
go-version-file: go.mod
5753
- run: make coverage

0 commit comments

Comments
 (0)