From 1b2348b060eea279e47952425ea710dab34e4af9 Mon Sep 17 00:00:00 2001 From: tsosunchia <59512455+tsosunchia@users.noreply.github.com> Date: Fri, 4 Sep 2026 12:41:03 +0800 Subject: [PATCH] =?UTF-8?q?ci(test):=20=E4=BD=BF=E7=94=A8=20setup-go=20?= =?UTF-8?q?=E7=BB=9D=E5=AF=B9=E8=B7=AF=E5=BE=84=E8=BF=90=E8=A1=8C=E6=8F=90?= =?UTF-8?q?=E6=9D=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07d19ca..049bf20 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,14 +65,16 @@ jobs: if: ${{ matrix.os != 'windows-latest' }} shell: bash run: | - sudo env GOTOOLCHAIN="${GOTOOLCHAIN}" go test -v -covermode=count -coverprofile='coverage.out' ./... + GO_BIN="$(command -v go)" + sudo env GOTOOLCHAIN=go1.27.1 "${GO_BIN}" test -v -covermode=count -coverprofile='coverage.out' ./... - name: Test alternate flavors with unix if: ${{ matrix.os != 'windows-latest' }} shell: bash run: | - sudo env GOTOOLCHAIN="${GOTOOLCHAIN}" go test -tags flavor_tiny ./cmd ./server - sudo env GOTOOLCHAIN="${GOTOOLCHAIN}" go test -tags flavor_ntr ./cmd ./server + GO_BIN="$(command -v go)" + sudo env GOTOOLCHAIN=go1.27.1 "${GO_BIN}" test -tags flavor_tiny ./cmd ./server + sudo env GOTOOLCHAIN=go1.27.1 "${GO_BIN}" test -tags flavor_ntr ./cmd ./server - name: Verify q v0.19.12 adapter parity if: ${{ matrix.os == 'ubuntu-latest' }} @@ -152,9 +154,10 @@ jobs: - name: Test with legacy JSON implementation run: | - sudo env GOTOOLCHAIN="${GOTOOLCHAIN}" GOEXPERIMENT="${GOEXPERIMENT}" go test ./... - sudo env GOTOOLCHAIN="${GOTOOLCHAIN}" GOEXPERIMENT="${GOEXPERIMENT}" go test -tags flavor_tiny ./cmd ./server - sudo env GOTOOLCHAIN="${GOTOOLCHAIN}" GOEXPERIMENT="${GOEXPERIMENT}" go test -tags flavor_ntr ./cmd ./server + GO_BIN="$(command -v go)" + sudo env GOTOOLCHAIN=go1.27.1 GOEXPERIMENT=nojsonv2 "${GO_BIN}" test ./... + sudo env GOTOOLCHAIN=go1.27.1 GOEXPERIMENT=nojsonv2 "${GO_BIN}" test -tags flavor_tiny ./cmd ./server + sudo env GOTOOLCHAIN=go1.27.1 GOEXPERIMENT=nojsonv2 "${GO_BIN}" test -tags flavor_ntr ./cmd ./server race: name: Race detector (Ubuntu)