diff --git a/.github/workflows/failpoint_test.yaml b/.github/workflows/failpoint_test.yaml index 0976fb180..944ab6b00 100644 --- a/.github/workflows/failpoint_test.yaml +++ b/.github/workflows/failpoint_test.yaml @@ -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 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6657c0770..a756439f1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -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 }} @@ -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 }} @@ -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 diff --git a/.go-version b/.go-version new file mode 100644 index 000000000..f124bfa15 --- /dev/null +++ b/.go-version @@ -0,0 +1 @@ +1.21.9 diff --git a/manydbs_test.go b/manydbs_test.go index 595c81b28..d0e80040f 100644 --- a/manydbs_test.go +++ b/manydbs_test.go @@ -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