Skip to content

Conversation

@Janell-Huyck
Copy link
Contributor

@Janell-Huyck Janell-Huyck commented Nov 19, 2025

Fix Coveralls integration and stabilize CI coverage reporting

This PR refactors our coverage and CI setup so Coveralls reports accurate, stable coverage, and disables one flaky feature spec.

Coveralls was reporting inconsistent and often too-low coverage because it was getting data twice (once from Ruby and once from CircleCI) and each parallel CircleCI node was independently telling Coveralls the run was finished with only partial data. We simplified things so SimpleCov only generates LCOV output, each parallel node uploads that LCOV through the Coveralls orb, and a single follow-up job sends the final “finished” signal. This gives Coveralls one clear, complete view of the test run, producing stable and accurate coverage numbers.

  • Simplify and centralize SimpleCov configuration

    • Move SimpleCov setup fully into rails_helper.rb, removing duplicate/complex setup from spec_helper.rb.
    • Use SimpleCov::Formatter::MultiFormatter with HTML + LCOV and simplecov-lcov single-file output, without invoking Coveralls::SimpleCov::Formatter directly.
    • Stop Ruby from uploading to Coveralls; coverage is now just generated locally as artifacts.
  • Fix Coveralls integration in CircleCI for parallel builds

    • In .circleci/config.yml, keep a single coveralls/upload step per parallel build node that only uploads the LCOV file.
    • Add a separate coveralls-finish job that runs once after all parallel build nodes and calls coveralls/upload with parallel_finished: true.
    • This removes duplicate uploads and ensures Coveralls only finalizes the build after all partial coverage reports are available.
  • Stabilize CI by disabling a flaky feature spec

    • Mark it "allows adding work to a collection" in spec/features/hyrax/work_show_spec.rb as xit with a comment explaining CI flakiness around the “Add to collection” modal.
    • Keeps the test in the codebase for future debugging while preventing intermittent CI failures.

…ization

- Remove SimpleCov/Coveralls setup from spec_helper.rb to prevent double initialization
- Consolidate all coverage setup in rails_helper.rb
- Add simplecov-lcov and configure LCOV formatter for CircleCI
- Use SimpleCov.formatters (plural) with all three formatters: HTML, LCOV, and Coveralls
- Configure formatters before starting SimpleCov to ensure proper setup
@Janell-Huyck Janell-Huyck changed the title Fix Coveralls coverage reporting by removing double SimpleCov initialization WIP Fix Coveralls coverage reporting by removing double SimpleCov initialization Nov 19, 2025
- Replace SimpleCov.start with Coveralls.wear! to properly handle parallel test execution
- Configure formatters before Coveralls.wear! starts SimpleCov
- Maintains LCOV formatter for CircleCI upload
@Janell-Huyck Janell-Huyck changed the title WIP Fix Coveralls coverage reporting by removing double SimpleCov initialization Fix Coveralls coverage reporting by removing double SimpleCov initialization Dec 1, 2025
@Janell-Huyck Janell-Huyck changed the title Fix Coveralls coverage reporting by removing double SimpleCov initialization LIBSCHOLAR-61: Fix Coveralls coverage reporting by removing double SimpleCov initialization Dec 1, 2025
@Janell-Huyck Janell-Huyck added the status: ready Issues ready to be started label Dec 3, 2025
@scherztc scherztc self-requested a review December 3, 2025 14:23
@scherztc scherztc self-assigned this Dec 6, 2025
@scherztc scherztc merged commit a45a30a into develop Dec 17, 2025
4 checks passed
@scherztc scherztc deleted the LIBSCHOLAR-61-fix-coveralls branch December 17, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready Issues ready to be started

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants