Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Add Coveralls CI workflow for test coverage reporting #53651

Closed
wants to merge 5 commits into from

Conversation

joelbladt
Copy link

Description

This Pull Request introduces a new GitHub Actions workflow to integrate Coveralls for automated test coverage reporting. The workflow is added under .github/workflows/coveralls.yml. It is designed to provide detailed code coverage metrics for pull requests and the main branches.

Benefit to End Users

The inclusion of Coveralls enhances the development workflow by providing:

  • Transparent Code Coverage Metrics: Developers and contributors gain insights into the impact of their changes on the overall code coverage.
  • Improved Code Quality: Encourages maintaining and improving code coverage across the framework.
  • Better Collaboration: Simplifies identifying areas of insufficient test coverage during code reviews.

These benefits ensure a more robust and reliable Laravel framework for developers and end users alike.

Implementation Details

  1. Workflow Name: coveralls
  2. Triggers: The workflow runs on:
  • Push events to the master branch and branches matching the *.x pattern.
  • All pull requests.
  1. Jobs Configuration:
  • Runs on ubuntu-24.04 with a matrix of PHP versions (8.2, 8.3, 8.4) and PHPUnit versions (10.5.12, 11.3.2).
  • Executes tests with phpunit and generates a Clover coverage report.
  • Uploads the coverage data to Coveralls using the php-coveralls library.

The workflow does not interfere with existing configurations and complements the current CI/CD processes.

Why It Doesn't Break Existing Features

  • The workflow operates independently of existing testing and deployment pipelines.
  • No changes were made to the core functionality or APIs of the Laravel framework.
  • The coveralls.yml file is isolated and only concerns reporting test coverage metrics.

How It Makes Building Web Applications Easier

By integrating Coveralls, contributors can:

  • Ensure that new code is properly tested and covered.
  • Quickly identify areas in the framework that need more rigorous testing.
  • Enhance trust and confidence in the stability of the framework with every new change.

Tests

No additional feature tests are required for this change since it pertains to CI workflow. However:

  • The workflow has been tested locally and on other repositories to ensure compatibility with the defined configurations and tools (PHP, PHPUnit, Coveralls).
  • Verified that coverage reports are generated and uploaded successfully to Coveralls.

@crynobone
Copy link
Member

10.x is only on security and internal updates for now. It wouldn't make much sense to add this

@driesvints driesvints closed this Nov 25, 2024
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.

3 participants