Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ on:
branches: [master]

permissions:
contents: write
checks: write
pull-requests: write
contents: read

jobs:
test:
Expand All @@ -21,25 +19,27 @@ jobs:
with:
go-version-file: go.mod

- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest

- name: Build
run: go build ./...

- name: Test
run: go test -race -coverprofile=coverage.out -covermode=atomic -json ./... > test-report.json
run: gotestsum --junitfile test-results.xml -- -race -coverprofile=coverage.out -covermode=atomic ./...

- name: Test report
- name: Upload to Codecov
if: always()
uses: dorny/test-reporter@v3
uses: codecov/codecov-action@v5
with:
name: Go Tests
path: test-report.json
reporter: golang-json
files: coverage.out
token: ${{ secrets.CODECOV_TOKEN }}

- name: Upload coverage
- name: Upload test results to Codecov
if: always()
uses: codecov/codecov-action@v5
uses: codecov/test-results-action@v1
with:
files: coverage.out
files: test-results.xml
token: ${{ secrets.CODECOV_TOKEN }}

- name: Vet
Expand Down
Loading