Skip to content

Add test coverage measurement with 95% threshold to CI#8

Merged
thomaspatzke merged 5 commits intomainfrom
copilot/integrate-test-coverage-ci
Feb 27, 2026
Merged

Add test coverage measurement with 95% threshold to CI#8
thomaspatzke merged 5 commits intomainfrom
copilot/integrate-test-coverage-ci

Conversation

Copy link

Copilot AI commented Feb 26, 2026

Integrates cargo-tarpaulin into the GitHub Actions CI pipeline, failing builds when line coverage drops below 95%.

CI workflow

  • Added cargo install cargo-tarpaulin and cargo tarpaulin --fail-under 95 steps to .github/workflows/test.yml

Test coverage (77.4% → 95.3%)

Added 73 tests to reach the threshold:

  • condition.rs — Edge cases: reserved words as identifiers, trailing tokens, all of them, error paths
  • types.rsDisplay impls, SigmaString methods, SigmaValue serde round-trips
  • lib.rs — Parser coverage via public API: all relation/correlation types, wildcard/escape parsing, expand modifier, all field accessors, error paths
  • pipeline.rsMapList variants across all transformations, service conditions, placeholder edge cases

No production code was modified.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits February 26, 2026 23:32
Co-authored-by: thomaspatzke <1845601+thomaspatzke@users.noreply.github.com>
Add tests for uncovered lines across condition.rs, types.rs, parser.rs
(via lib.rs public API), and pipeline.rs:

- condition.rs: trailing tokens, reserved words as identifiers, all of
  them, error after of, unexpected token/end-of-expression errors
- types.rs: Display impls for Status, Level, SigmaString, SigmaValue,
  ConditionExpression; has_special_parts, as_plain, From<String>; serde
  deserialization for float and bool
- parser.rs (via lib.rs): get_string_list single string, value_as_string
  for numbers, relation types, correlation types, sigma string wildcards
  and escapes, float detection values, expand modifier, search identifier
  errors, condition list errors, related entry errors, all known keys,
  alias errors, correlation condition errors, correlation rule fields
- pipeline.rs: unknown transformation type, MapList variants for all
  transformations, change_logsource service, set_state, empty var error,
  logsource service condition

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: thomaspatzke <1845601+thomaspatzke@users.noreply.github.com>
Co-authored-by: thomaspatzke <1845601+thomaspatzke@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test coverage measurement in GitHub Actions CI Add test coverage measurement with 95% threshold to CI Feb 26, 2026
@thomaspatzke thomaspatzke marked this pull request as ready for review February 27, 2026 22:05
@thomaspatzke thomaspatzke merged commit 935b908 into main Feb 27, 2026
2 checks passed
@thomaspatzke thomaspatzke deleted the copilot/integrate-test-coverage-ci branch February 27, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants