Skip to content

Commit

Permalink
Adopt the .go-version approach for toolchain versioning
Browse files Browse the repository at this point in the history
Signed-off-by: Chun-Hung Tseng <[email protected]>
Co-authored-by: Iván Valdés Castillo <[email protected]>
  • Loading branch information
henrybear327 and ivanvc committed Apr 4, 2024
1 parent 980f2a6 commit d62ad4b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/failpoint_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v3
with:
go-version: "1.21.9"
go-version: ${{ steps.goversion.outputs.goversion }}
- run: |
make gofail-enable
make test-failpoint
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v3
with:
go-version: "1.21.9"
go-version: ${{ steps.goversion.outputs.goversion }}
- run: make fmt
- env:
TARGET: ${{ matrix.target }}
Expand Down Expand Up @@ -64,9 +66,11 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v3
with:
go-version: "1.21.9"
go-version: ${{ steps.goversion.outputs.goversion }}
- run: make fmt
- env:
TARGET: ${{ matrix.target }}
Expand All @@ -92,8 +96,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v3
with:
go-version: "1.21.9"
go-version: ${{ steps.goversion.outputs.goversion }}
- run: make coverage

1 change: 1 addition & 0 deletions .go-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.21.9
5 changes: 2 additions & 3 deletions manydbs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ func createAndPutKeys(t *testing.T) {
}

var key [16]byte
_, rerr := rand.Read(key[:])
if rerr != nil {
return rerr
if _, err := rand.Read(key[:]); err != nil {
return err
}
if err := nodes.Put(key[:], nil); err != nil {
return err
Expand Down

0 comments on commit d62ad4b

Please sign in to comment.