aboutsummaryrefslogblamecommitdiff
path: root/.github/workflows/codecov.yml
blob: 57b0b15df4249b9f2139fefe5d1508a62942cc5e (plain) (tree)
1
2
3
4
5
6
7
8
9






                          
                                 
                                 

                          
                   
                                   









                                                                                              






                                                                             
                                       
name: codecov
on: [push]
jobs:
  codecov:
    name: codecov
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-go@v3
        with:
          go-version: 1.14
      - name: cache
        uses: actions/cache@v3.0.11
        with:
          path: |
            ~/.cache/go-build
            ~/go/pkg/mod
          key: |
            ${{ runner.os }}-build-${{ hashFiles('**/go.mod') }}-${{ hashFiles('**/go.sum') }}
          restore-keys: |
            ${{ runner.os }}-build-${{ hashFiles('**/go.mod') }}-
            ${{ runner.os }}-build-
            ${{ runner.os }}-
      - name: vet
        run: |
          go vet ./...
      - name: generate report
        run: |
          go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
      - name: upload coverage report
        uses: codecov/codecov-action@v3