mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
ci: run -race only on cgo=1 legs (-race requires cgo)
The Test step ran 'go test -race' with CGO_ENABLED=${{matrix.cgo}}, so
the cgo=0 matrix legs failed (-race requires cgo). Split into a race
step (cgo=1) and a pure-Go step (cgo=0).
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This commit is contained in:
co-authored by
Hanzo Dev
parent
0fe370c77c
commit
ace196fb3a
@@ -25,10 +25,18 @@ jobs:
|
||||
- name: gofmt
|
||||
if: matrix.cgo == '0'
|
||||
run: test -z "$(gofmt -s -l .)"
|
||||
- name: Test
|
||||
# -race requires cgo, so it only runs on the cgo=1 legs. The cgo=0
|
||||
# legs run the same suite without the race detector (pure-Go path).
|
||||
- name: Test (race)
|
||||
if: matrix.cgo == '1'
|
||||
env:
|
||||
CGO_ENABLED: ${{ matrix.cgo }}
|
||||
CGO_ENABLED: '1'
|
||||
run: go test -v -count=1 -race -timeout=15m ./...
|
||||
- name: Test (no race, pure-Go)
|
||||
if: matrix.cgo == '0'
|
||||
env:
|
||||
CGO_ENABLED: '0'
|
||||
run: go test -v -count=1 -timeout=15m ./...
|
||||
- name: Coverage (CGO build, amd64 only — single canonical baseline)
|
||||
if: matrix.cgo == '1' && matrix.arch == 'amd64'
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user