Skip to content

Merge pull request #449 from onflow/dependabot/github_actions/github/… #876

Merge pull request #449 from onflow/dependabot/github_actions/github/…

Merge pull request #449 from onflow/dependabot/github_actions/github/… #876

Workflow file for this run

# coverage.yml Generate and upload Go code coverage report to Codecov.
# https:/onflow/atree/blob/main/.github/workflows/coverage.yml
name: coverage
# Remove permissions from top level and grant in jobs.
permissions: {}
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 2
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
check-latest: true
- name: Get dependencies
run: go get -v -t -d ./...
- name: Build project
run: go build ./...
- name: Generate coverage report
run: go test -timeout 180m -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
files: ./coverage.txt
fail_ci_if_error: false # we can set this to true after "Could not find a repository" upload error is fixed
verbose: true # optional (default = false)