Skip to content

Merge pull request #393 from onflow/dependabot/github_actions/github/… #676

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

Merge pull request #393 from onflow/dependabot/github_actions/github/… #676

Workflow file for this run

# coverage.yml Generate and upload Go code coverage report to Codecov.
# https://github.com/onflow/atree/blob/main/.github/workflows/coverage.yml
name: coverage
# Remove permissions from top level and grant in jobs.
permissions: {}
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 2
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
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 60m -race -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@7afa10ed9b269c561c2336fd862446844e0cbf71 # v4.2.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)