Skip to content

test(ci): expand CLIPipeline coverage and verify UnitTests in deploy workflow - #528

Merged
fernandotonon merged 1 commit into
masterfrom
codex/coverage-near-90
May 14, 2026
Merged

test(ci): expand CLIPipeline coverage and verify UnitTests in deploy workflow#528
fernandotonon merged 1 commit into
masterfrom
codex/coverage-near-90

Conversation

@fernandotonon

@fernandotonon fernandotonon commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds substantial CLIPipeline_test.cpp coverage for CLI paths and edge cases.
  • Updates .github/workflows/deploy.yml so CI explicitly verifies the UnitTests target runs as intended.

Testing

  • Local: cmake --build build --target UnitTests and filtered runs as applicable.

Branch: codex/coverage-near-90 (1 commit ahead of master).

Made with Cursor

Summary by CodeRabbit

  • Tests

    • Expanded test coverage for CLI pipeline commands, including atlas operations, analysis, memory, optimization, and decimation workflows.
  • Chores

    • Enhanced CI/CD validation to verify test discovery and execution consistency.

Review Change Stack

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 936c9238-1f66-4e49-a2c4-1ca6d531e45e

📥 Commits

Reviewing files that changed from the base of the PR and between 96a1f57 and e51f38d.

📒 Files selected for processing (2)
  • .github/workflows/deploy.yml
  • src/CLIPipeline_test.cpp

📝 Walkthrough

Walkthrough

This PR adds test case count verification to the CI workflow and significantly expands CLIPipeline test coverage. The workflow now validates that gtest execution produces the expected number of test cases, and the test suite adds comprehensive coverage for atlas, atlas-apply, and mesh processing commands including argument validation, file handling, and successful execution paths.

Changes

CI Test Count Validation

Layer / File(s) Summary
Test counting helper functions
.github/workflows/deploy.yml
count_testcases_in_xml parses JUnit XML for testcase counts; count_listed_tests invokes --gtest_list_tests (with optional filter) to discover expected cases.
Test count validation in run_test helper
.github/workflows/deploy.yml
run_test computes expected test count before execution and actual count from the JUnit XML output file, then fails if they differ.
UnitTests suite loop with aggregate validation
.github/workflows/deploy.yml
UnitTests isolation loop precomputes aggregate expected counts, validates per-suite counts during execution, asserts totals match after the loop, and updates summary output with executed vs expected case totals.

CLI Command Test Coverage Expansion

Layer / File(s) Summary
Scene cleanup utility and atlas command tests
src/CLIPipeline_test.cpp
Added clearManagerScene() helper to destroy Ogre scene nodes; new CLIPipelineCmdAtlas tests cover missing inputs, missing source images, successful atlas+JSON manifest writing, and manifest write failures.
Atlas-apply command argument validation
src/CLIPipeline_test.cpp
New CLIPipelineCmdAtlasApply test cases assert usage errors for missing required arguments, invalid --match modes, missing files, and invalid atlas/manifest combinations.
Analyze, memory, vertex-cache, decimate, optimize functional tests
src/CLIPipeline_test.cpp
Added CLIPipelineCmdTest cases validating successful execution paths and output creation for analyze (text and JSON), memory (with budget and flags), vertex-cache (analyze + rewrite), decimate (no-op output), and optimize (vertex-cache only).
Phase 6 CLI argument validation
src/CLIPipeline_test.cpp
Test suite asserting correct usage vs runtime error codes when memory, analyze, vertex-cache, decimate, and optimize are invoked with missing inputs/outputs or invalid parameter combinations.

Possibly related PRs

  • fernandotonon/QtMeshEditor#505: Implements the atlas subcommand in src/CLIPipeline.cpp and TextureAtlasPacker, which the new test cases in this PR directly exercise.
  • fernandotonon/QtMeshEditor#253: Also modifies .github/workflows/deploy.yml to add XML-based gtest accounting and CI failure logic based on computed test counts.
  • fernandotonon/QtMeshEditor#511: Introduces the atlas-apply command, whose argument validation and file-handling behavior is directly tested by the new CLIPipelineCmdAtlasApply test cases.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 In workflows we count and in tests we cast wide,
Checking atlases, meshes, and args as our guide,
From Bash helper functions to test fixtures bright,
Validation and coverage—all bundled up right! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the two main changes: expanding CLIPipeline test coverage and verifying UnitTests in the deploy workflow.
Description check ✅ Passed The description covers the summary and testing sections but lacks detailed technical information about the specific changes made in each file.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/coverage-near-90

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@fernandotonon
fernandotonon merged commit 116223c into master May 14, 2026
20 checks passed
@fernandotonon
fernandotonon deleted the codex/coverage-near-90 branch May 14, 2026 16:07
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.

1 participant