Skip to content

ci: add support for codecov (#271) #3

ci: add support for codecov (#271)

ci: add support for codecov (#271) #3

Workflow file for this run

name: CodeCov Coverage
permissions:
contents: read
on:
push:
pull_request:
merge_group:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout should always be before setup-go to ensure caching is working
- uses: actions/checkout@v5
with:
fetch-depth: 2
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Install plugin
run: make install-plugin
- name: Build binaries
run: make build
- name: Run coverage
run: go tool gotestsum --format github-actions --junitfile junit.xml -- -coverprofile=coverage.out -covermode=count ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}