Skip to content

Commit 85acf7b

Browse files
committed
check building with both CGO enabled/disabled on CI
1 parent 93d458d commit 85acf7b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ jobs:
3838
- uses: actions/setup-go@v4
3939
with:
4040
go-version: ${{ matrix.go }}
41-
# Set -race for catching data races on dog fooding (#333)
42-
- run: go build -race ./cmd/actionlint
41+
- run: go test -v -race -coverprofile coverage.txt -covermode=atomic ./...
42+
- run: go tool cover -func ./coverage.txt
43+
# Check build without CGO
44+
- run: go build ./cmd/actionlint
4345
env:
4446
# Note: -race requires cgo
4547
CGO_ENABLED: 0
46-
- run: go test -v -race -coverprofile coverage.txt -covermode=atomic ./...
47-
- run: go tool cover -func ./coverage.txt
48+
# Set -race for catching data races on dog fooding (#333)
49+
- run: go build -race ./cmd/actionlint
4850
- name: Dog fooding 🐶
4951
run: |
5052
echo "::add-matcher::.github/actionlint-matcher.json"

0 commit comments

Comments
 (0)