Skip to content

Commit

Permalink
chore: use go-version-file to read .go-version
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
  • Loading branch information
mmorel-35 committed Feb 20, 2025
1 parent 0f8947f commit faf41f8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/benchmark-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
go-version-file: .go-version
- name: Run Benchmarks
run: |
BENCHSTAT_OUTPUT_FILE=result.txt make test-benchmark-compare REF=${{ inputs.benchGitRef }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/failpoint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
go-version-file: .go-version
- run: |
make gofail-enable
make test-failpoint
4 changes: 1 addition & 3 deletions .github/workflows/robustness_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ jobs:
runs-on: ${{ fromJson(inputs.runs-on) }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
go-version-file: .go-version
- name: test-robustness
run: |
set -euo pipefail
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/tests-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ jobs:
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
go-version-file: .go-version
- run: make fmt
- env:
TARGET: ${{ matrix.target }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/tests_amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
go-version-file: .go-version
- run: make coverage
8 changes: 2 additions & 6 deletions .github/workflows/tests_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
go-version-file: .go-version
- run: make fmt
- env:
TARGET: ${{ matrix.target }}
Expand All @@ -49,9 +47,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: ${{ steps.goversion.outputs.goversion }}
go-version-file: .go-version
- run: make coverage

0 comments on commit faf41f8

Please sign in to comment.