From 8f9df49a0bedcd6092a796e5b023a9acfc8bccd3 Mon Sep 17 00:00:00 2001 From: lufia Date: Sat, 22 Aug 2026 15:11:39 +0900 Subject: [PATCH] .github/workflows/test.yml: add -race and -cover option Change-Id: I8b561fc3563d6b25cd00d642a1b1787b668dba9e --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 039dcdf..0d9d4e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,17 +31,22 @@ jobs: include: - arch: amd64 os: ubuntu-24.04 + flags: -race -covermode=atomic -coverprofile=cover.out - arch: 386 os: ubuntu-24.04 + # -race is not supported on 386 so we should omit it. + flags: -covermode=atomic -coverprofile=cover.out - arch: arm64 os: macos-15 + flags: -race -covermode=atomic -coverprofile=cover.out runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: ${{ matrix.go }} - - run: go test + - run: go test $TESTFLAGS ./... shell: bash env: GOARCH: ${{ matrix.arch }} + TESTFLAGS: ${{ matrix.flags }}