rsyslog/.codecov.yml
Rainer Gerhards 9e0ecb5f8d
ci: improve Codecov uploads; deflake kafka topics
Motivation: code coverage reports were incomplete. This lays a better
base for consistent reporting via GitHub Actions, with room for follow-ups.
It also removes a test flake source in Kafka jobs.

Impact: CI/tests only; no runtime behavior or ABI changes expected.

Before: Coverage uploads were inconsistent; Kafka tests could hang while
reading from /dev/urandom to generate topic names.
After: Coverage is collected with lcov and uploaded via a dedicated GH
Action; Kafka topics use fast $RANDOM-based hex, avoiding early-boot
entropy stalls.

Technical details:
- Add two workflows: "codecov base" and "codecov kafka" on Ubuntu 24.04.
  Use lcov capture with unexecuted blocks and prune common noise; upload
  with token for same-repo PRs and tokenless for forks.
- Update .codecov.yml: add path fixes for container (/rsyslog) and
  runner layouts; explicitly set comment: false and patch: false.
- Bump actions/checkout to v4 in existing workflows; add an actionlint
  job to catch YAML problems early.
- Switch codecov jobs in container matrix to 24.04 images.
- Improve run-ci.sh lcov invocation to be more tolerant of line/macro
  mismatches.
- Testbench: replace /dev/urandom topic generation with 8-char hex from
  $RANDOM; adjust diag.sh path/quoting for zookeeper helper.
2025-09-08 16:02:01 +02:00

48 lines
1.5 KiB
YAML

# note: codecov doc is hard to navigate. The info on SPLITTING UP PROJECTS
# can be found here: https://docs.codecov.io/docs/commit-status
# This link also contains helpful other config info not easily found.
fixes:
# Fix for container builds where the git checkout is at /rsyslog
- "/rsyslog/::"
# Fix for GitHub Actions runners
- "/home/runner/work/rsyslog/rsyslog/::"
# keep Codecov PR comment disabled
comment: false
coverage:
# to get things started, let's aim at a lower goal. This actually helps
# to find those areas that we need to concentrate on.
range: "50...75"
status:
project:
default:
target: auto
threshold: 0.5
informational: true # non-blocking
contrib:
paths: ["contrib/**"] # split status for contrib subtree
threshold: 0.5
informational: true # non-blocking
patch: false # disable patch status entirely
ignore:
# different execution pathes (if not, remove) -- rgerhards, 2018-10-12
# will be removed soon: https://github.com/rsyslog/rsyslog/issues/2103
- "contrib/imczmq"
- "contrib/omczmq"
# we are currently unable to provide test environment for these:
- "plugins/imgssapi/**"
- "plugins/omgssapi/**"
# these seem to be untestable under CI runs by principle because
# that would require a service registration
# see also: https://github.com/rsyslog/rsyslog/issues/3073
- "runtime/lib_ksi_queue.c"
- "runtime/lib_ksils12.c"
- "runtime/lmsig_ksi-ls12.c"