Skip to content

Commit

Permalink
check building with both CGO enabled/disabled on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Aug 6, 2023
1 parent 93d458d commit 85acf7b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
# Set -race for catching data races on dog fooding (#333)
- run: go build -race ./cmd/actionlint
- run: go test -v -race -coverprofile coverage.txt -covermode=atomic ./...
- run: go tool cover -func ./coverage.txt
# Check build without CGO
- run: go build ./cmd/actionlint
env:
# Note: -race requires cgo
CGO_ENABLED: 0
- run: go test -v -race -coverprofile coverage.txt -covermode=atomic ./...
- run: go tool cover -func ./coverage.txt
# Set -race for catching data races on dog fooding (#333)
- run: go build -race ./cmd/actionlint
- name: Dog fooding 🐶
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
Expand Down

0 comments on commit 85acf7b

Please sign in to comment.