| 1 |
name: main |
| 2 |
on: |
| 3 |
- push |
| 4 |
- pull_request |
| 5 |
jobs: |
| 6 |
build: |
| 7 |
name: Build |
| 8 |
runs-on: ubuntu-latest |
| 9 |
steps: |
| 10 |
- name: Setup Go |
| 11 |
uses: actions/setup-go@v1 |
| 12 |
with: |
| 13 |
go-version: 1.24 |
| 14 |
id: go |
| 15 |
- name: Code checkout |
| 16 |
uses: actions/checkout@v1 |
| 17 |
- name: Test |
| 18 |
run: | |
| 19 |
go test -v ./... -coverprofile=coverage.txt -covermode=atomic |
| 20 |
go test -v ./... -race |
| 21 |
- name: Build |
| 22 |
run: | |
| 23 |
GOOS=linux go build |
| 24 |
GOOS=darwin go build |
| 25 |
GOOS=freebsd go build |
| 26 |
GOOS=windows go build |
| 27 |
GOARCH=386 go build |
| 28 |
- name: Publish coverage |
| 29 |
uses: codecov/[email protected] |
| 30 |
with: |
| 31 |
token: ${{secrets.CODECOV_TOKEN}} |
| 32 |
file: ./coverage.txt |
| 33 |
|