| 1 |
name: goveralls |
| 2 |
on: [push, pull_request] |
| 3 |
jobs: |
| 4 |
test: |
| 5 |
runs-on: ubuntu-latest |
| 6 |
steps: |
| 7 |
- name: Set up Go |
| 8 |
uses: actions/setup-go@v5 |
| 9 |
with: |
| 10 |
go-version: "1.16" |
| 11 |
|
| 12 |
- name: Check out code |
| 13 |
uses: actions/checkout@v4 |
| 14 |
|
| 15 |
- name: Run coverage |
| 16 |
run: | |
| 17 |
go test -covermode atomic -coverprofile=coverage.out ./... |
| 18 |
|
| 19 |
- name: Install goveralls |
| 20 |
run: go install github.com/mattn/goveralls@latest |
| 21 |
|
| 22 |
- name: Send coverage |
| 23 |
env: |
| 24 |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 25 |
run: goveralls -coverprofile=coverage.out -service=github |