Automattic / Automattic/VIP-Coding-Standards

CI: add code coverage check

Open
#661 0 comments 0 reactions 0 assignees View on GitHub
Type: Maintenance
Dominant language
PHP
Stars
261
Forks
44
Avg merge
19m
Merged PRs (30d)
1

Description

Follow up action after #628

Conversation about this between @GaryJones and @jrfnl from #628:

>>> Register with coveralls.io (or another service) and start recording and checking code coverage for builds.
>>
>> What sort of code coverage % do we currently have?
>
>![image](https://user-images.githubusercontent.com/663378/109984243-dcefa980-7d03-11eb-8320-3217e2ef7bd2.png)
>
>It's one of the things I've been monitoring locally when I have been working on individual sniffs.
>
>> Can this be done within the GitHub Actions rather than using an external service to display the results?
>
>Yes, we can use the `text` reporter instead of checkstyle to see the results in the action.
>
>We'd need to investigate how we can make the build fail on a decrease in code coverage in that case though. That part is what external services do automatically (and with configurable settings).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the repository’s GitHub Actions configuration and the coverage discussion in #628. Determine whether coverage should use Coveralls or an in-action text reporter, how the current percentage is established, and how a decrease should fail the build. Done means builds record coverage and enforce the agreed decrease check.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, php
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.