| 1 | name: coverage |
| 2 | on: [push] |
| 3 | jobs: |
| 4 | |
| 5 | build: |
| 6 | name: build |
| 7 | runs-on: ${{ matrix.os }} |
| 8 | strategy: |
| 9 | matrix: |
| 10 | os: [ubuntu-latest, windows-latest] |
| 11 | steps: |
| 12 | |
| 13 | - name: Set up Go |
| 14 | uses: actions/setup-go@v5 |
| 15 | with: |
| 16 | go-version: 1.18 |
| 17 | id: go |
| 18 | |
| 19 | - name: Check out code into the Go module directory |
| 20 | uses: actions/checkout@v4 |
| 21 | |
| 22 | - name: Get dependencies |
| 23 | run: go get -v -t -d ./... |
| 24 | |
| 25 | - name: Build |
| 26 | run: go build -v . |
| 27 | |
| 28 | - name: Test |
| 29 | run: go test -coverpkg="github.com/gdamore/encoding/..." -covermode=count -coverprofile="coverage.txt" ./... |
| 30 | |
| 31 | - name: Upload coverage to Codecov |
| 32 | uses: codecov/[email protected] |
| 33 | with: |
| 34 | token: ${{ secrets.CODECOV_TOKEN }} |
| 35 | file: ./coverage.txt |
| 36 | flags: unittests |
| 37 | name: codecov-umbrella |
| 38 | yml: ./codecov.yml |