Merge pull request #179 from warunalakshitha/codecov_pr_annotations #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Native CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Run tests with coverage | |
| run: go test -race -count=1 -skip 'TestParseCorpusFiles|TestJBalUnitTests|TestJBalUnitBIRTests' -coverpkg=./... -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: coverage.out | |
| fail_ci_if_error: true | |
| - name: Check gofmt | |
| run: | | |
| unformatted=$(gofmt -l -s .) | |
| if [ -n "$unformatted" ]; then | |
| echo "Unformatted Go files detected:" | |
| echo "$unformatted" | |
| exit 1 | |
| fi |