Skip to content

[codex] Add coverage checks#182

Merged
66Ton99 merged 1 commit into
formapro:masterfrom
66Ton99:codex/add-coverage
Jun 4, 2026
Merged

[codex] Add coverage checks#182
66Ton99 merged 1 commit into
formapro:masterfrom
66Ton99:codex/add-coverage

Conversation

@66Ton99
Copy link
Copy Markdown
Collaborator

@66Ton99 66Ton99 commented Jun 4, 2026

Summary

  • Add PHP and JavaScript coverage scripts that generate Cobertura XML.
  • Add a shared Cobertura coverage checker with line-coverage thresholds.
  • Add a dedicated GitHub Actions Coverage job using PHP 8.3 with Xdebug and Node 22.
  • Upload Cobertura reports to GitHub Code Quality with actions/upload-code-coverage@v1 when workflow permissions allow.
  • Keep raw PHP/Jest coverage reports as workflow artifacts.
  • Document the new local coverage commands in README.md and AGENTS.md.

Coverage thresholds

  • PHP line coverage: minimum 50% (current local result: 51.36%).
  • JavaScript line coverage: minimum 60% (current local result: 60.84%).

Validation

  • php /tmp/jsfv-composer.phar validate --strict
  • php /tmp/jsfv-composer.phar coverage
  • npm run test:coverage
  • php /tmp/jsfv-composer.phar test
  • php /tmp/jsfv-composer.phar phpstan
  • npm test
  • git diff --check

Notes

  • This follows GitHub Code Quality coverage docs: Cobertura XML, code-quality: write, PR head checkout, and actions/upload-code-coverage@v1.
  • Coverage upload is skipped for fork pull requests by GitHub permission rules, but the Coverage check and artifacts still run on the PR. After merge/push inside the repository, GitHub can receive the uploaded reports.
  • Existing npm dependency audit/deprecation notices remain, but tests and coverage checks pass.

Add composer and npm coverage scripts that generate Clover reports for PHPUnit and Jest.

Add tools/check-clover-coverage.php to enforce line coverage thresholds from Clover XML without requiring an external coverage service.

Configure GitHub Actions to run a dedicated Coverage job on PHP 8.3 with Xdebug and Node 22, then upload PHP and JavaScript coverage reports as artifacts.

Start with conservative thresholds that the current suite passes: PHP line coverage at 50% and JavaScript line coverage at 60%.

Update README.md and AGENTS.md with the new local coverage commands and generated-report ignores.

Validation: php /tmp/jsfv-composer.phar coverage; npm run test:coverage; php /tmp/jsfv-composer.phar validate --strict; php /tmp/jsfv-composer.phar test; php /tmp/jsfv-composer.phar phpstan; npm test; git diff --check.

Co-authored-by: Codex <codex@openai.com>
@66Ton99 66Ton99 marked this pull request as ready for review June 4, 2026 21:20
@66Ton99 66Ton99 merged commit b251f51 into formapro:master Jun 4, 2026
8 checks passed
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