| 1 |
name: main |
| 2 |
on: |
| 3 |
- push |
| 4 |
- pull_request |
| 5 |
jobs: |
| 6 |
build: |
| 7 |
name: Test |
| 8 |
runs-on: ubuntu-latest |
| 9 |
steps: |
| 10 |
- name: Setup Go |
| 11 |
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 |
| 12 |
with: |
| 13 |
go-version: stable |
| 14 |
id: go |
| 15 |
- name: Code checkout |
| 16 |
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 |
| 17 |
with: |
| 18 |
persist-credentials: false |
| 19 |
- name: Test |
| 20 |
run: | |
| 21 |
go test -v ./... -coverprofile=coverage.txt -covermode=atomic |
| 22 |
- name: Publish coverage |
| 23 |
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 |
| 24 |
with: |
| 25 |
token: ${{secrets.CODECOV_TOKEN}} |
| 26 |
files: ./coverage.txt |
| 27 |
fail_ci_if_error: false |
| 28 |
|