github.com/onflow/atree@v0.6.0/.github/workflows/coverage.yml (about) 1 # coverage.yml Generate and upload Go code coverage report to Codecov. 2 # https://github.com/onflow/atree/blob/main/.github/workflows/coverage.yml 3 4 name: coverage 5 6 # Remove permissions from top level and grant in jobs. 7 permissions: {} 8 9 on: [push, pull_request] 10 11 jobs: 12 build: 13 runs-on: ubuntu-latest 14 15 permissions: 16 contents: read 17 18 steps: 19 - uses: actions/checkout@v3 20 with: 21 fetch-depth: 2 22 23 - uses: actions/setup-go@v3 24 with: 25 go-version: '1.19' 26 check-latest: true 27 28 - name: Get dependencies 29 run: go get -v -t -d ./... 30 31 - name: Build project 32 run: go build ./... 33 34 - name: Generate coverage report 35 run: go test -timeout 60m -race -coverprofile=coverage.txt -covermode=atomic 36 37 - name: Upload coverage report to Codecov 38 uses: codecov/codecov-action@v3.1.1 39 with: 40 files: ./coverage.txt 41 fail_ci_if_error: false # we can set this to true after "Could not find a repository" upload error is fixed 42 verbose: true # optional (default = false)