Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Coverage

on:
pull_request:
push:
branches:
- master

permissions:
contents: read

jobs:
coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read

steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Set Up Go Environment
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

- name: Generate Test Coverage
run: go test ./... -covermode=atomic -coverpkg=./... -coverprofile=cover.out

- name: Upload Coverage
uses: codecov/codecov-action@v7
with:
files: ./cover.out
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions PROJECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ This repository is configured with these GitHub workflows:

- `check`: runs linting, the normal Go test suite, and the showcase end-to-end
tests across supported platforms.
- `coverage`: uploads Go coverage to Codecov, where `codecov.yml` requires
90% patch coverage for pull requests.
- `release-binaries`: reads `VERSION`, builds Linux, macOS, and Windows
binaries, signs and notarizes the macOS ARM64 and x64 ZIPs, and creates the
matching GitHub Release on pushes to `master`. It runs on a self-hosted macOS
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Embed Code

[![Coverage](https://codecov.io/gh/SpineEventEngine/embed-code-go/branch/master/graph/badge.svg)](https://codecov.io/gh/SpineEventEngine/embed-code-go)

Embed Code is a Go command-line tool that keeps documentation snippets in sync
with source files. It scans Markdown and HTML documents for `<embed-code>`
instructions, resolves the requested source content, and manages the following
Expand Down
8 changes: 8 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
coverage:
status:
project: off
patch:
default:
target: 90%
threshold: 0%
only_pulls: true
Loading