diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index d19811995..a114cb201 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -46,7 +46,8 @@ jobs: cache: true - name: Tests and coverage run: | - go run mage.go coverage ${{ matrix.build-flag }} + export BUILD_TAGS="${{ matrix.build-flag }}" + go run mage.go coverage - name: "Codecov: General" uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 if: ${{ matrix.go-version == '1.22.x' }} diff --git a/magefile.go b/magefile.go index 105c7023b..17d803daf 100644 --- a/magefile.go +++ b/magefile.go @@ -144,8 +144,10 @@ func buildTagsFlags(tags string) string { } // Coverage runs tests with coverage and race detector enabled. -func Coverage(tags string) error { - tags = buildTagsFlags(tags) +// Usage: mage coverage [buildTags] +func Coverage() error { + buildTags := os.Getenv("BUILD_TAGS") + tags := buildTagsFlags(buildTags) if err := os.MkdirAll("build", 0755); err != nil { return err }