Skip to content

S010: Testing, CI/CD & Binary Distribution

FieldValue
SpecS010
FeatureTesting, CI/CD & Binary Distribution
Date2026-04-24
StatusDraft
Authorspec-writer-agent

Overview

Parity's quality gates span three coordinated systems: a Pest-based test suite validating all rules, coverage readers, and CLI behavior; a GitHub Actions CI pipeline running lint, test, and coverage jobs on every push and pull request; and a Box-based PHAR compilation pipeline that packages the application into a standalone distributable binary. Laravel Pint enforces code style, and the release process governs version bumping, changelog generation, git tagging, and GitHub Release creation.

This specification defines the complete contract for all four areas: test suite structure and coverage expectations, CI/CD workflow jobs and triggers, binary distribution via Box PHAR, and the end-to-end release process. It serves as the source of truth for implementation (S010-FR), acceptance testing (S010-AS), QA edge-case coverage (S010-EC), non-functional constraints (S010-NF), and measurable success criteria (S010-SC).

User Scenarios

S010-US-001 [P1] As a developer, I want to run the full test suite via php artisan test so that I can verify all Parity functionality locally before pushing.

S010-US-002 [P1] As a CI pipeline, I want to run lint, test, and coverage jobs in parallel so that I can get fast feedback on pull requests.

S010-US-003 [P1] As a developer, I want the CI pipeline to fail if code style violations exist so that style drift is never merged.

S010-US-004 [P1] As a maintainer, I want to trigger a version bump and have it automatically update CHANGELOG.md, create a git tag, and draft a GitHub Release so that releases are consistent and auditable.

S010-US-005 [P2] As a user, I want to download a standalone PHAR binary so that I can use Parity without installing PHP or Composer.

S010-US-006 [P2] As a package author, I want to verify that my plugin rules are tested in Parity's CI so that custom rule authors have a reference implementation.

Requirements Summary

IDTypePriorityTitleStatus
S010-FR-001FunctionalP1Test suite organizationDraft
S010-FR-002FunctionalP1Test naming conventionsDraft
S010-FR-003FunctionalP1Pest configurationDraft
S010-FR-004FunctionalP1Coverage threshold enforcementDraft
S010-FR-005FunctionalP1Spec ID traceability in testsDraft
S010-FR-006FunctionalP1CI pipeline triggersDraft
S010-FR-007FunctionalP1CI lint jobDraft
S010-FR-008FunctionalP1CI test jobDraft
S010-FR-009FunctionalP1CI coverage jobDraft
S010-FR-010FunctionalP1CI artifact publicationDraft
S010-FR-011FunctionalP1Box PHAR compilationDraft
S010-FR-012FunctionalP1PHAR distribution mechanismDraft
S010-FR-013FunctionalP1PHAR version injectionDraft
S010-FR-014FunctionalP1Laravel Pint integrationDraft
S010-FR-015FunctionalP1Release version bumpingDraft
S010-FR-016FunctionalP1Changelog generationDraft
S010-FR-017FunctionalP1Git taggingDraft
S010-FR-018FunctionalP1GitHub Release creationDraft
S010-FR-019FunctionalP1Sample project matrixDraft
S010-AS-001AcceptanceP1Full test suite passes locallyDraft
S010-AS-002AcceptanceP1CI pipeline runs on push to mainDraft
S010-AS-003AcceptanceP1CI pipeline runs on pull requestsDraft
S010-AS-004AcceptanceP1CI lint job fails on style violationsDraft
S010-AS-005AcceptanceP1CI test job fails on test failuresDraft
S010-AS-006AcceptanceP1PHAR compiles successfullyDraft
S010-AS-007AcceptanceP1PHAR runs parity check successfullyDraft
S010-AS-008AcceptanceP1Release script updates VERSION and CHANGELOGDraft
S010-AS-009AcceptanceP1Release script creates git tagDraft
S010-AS-010AcceptanceP1Release script creates GitHub ReleaseDraft
S010-AS-011AcceptanceP1Sample project configs passDraft
S010-EC-001Edge CaseP1Pest test group with no matching spec IDDraft
S010-EC-002Edge CaseP1Coverage below threshold triggers CI failureDraft
S010-EC-003Edge CaseP1Box PHAR compilation failureDraft
S010-EC-004Edge CaseP2Pint fixes file during CI lint checkDraft
S010-EC-005Edge CaseP1Release script run on dirty git stateDraft
S010-EC-006Edge CaseP2Composer dependencies unavailable during PHAR buildDraft
S010-NF-001Non-FunctionalP1Test suite executes in under 60 secondsDraft
S010-NF-002Non-FunctionalP1CI pipeline completes in under 5 minutesDraft
S010-NF-003Non-FunctionalP2PHAR binary under 30MB targetDraft
S010-SC-001SuccessP1All Pest tests passDraft
S010-SC-002SuccessP1All CI jobs green on main branchDraft
S010-SC-003SuccessP1PHAR binary is executable and self-containedDraft
S010-SC-004SuccessP1Release artifacts signed and verifiableDraft
S010-SC-005SuccessP1Sample projects cover supported language/framework configurationsDraft

Cross-Spec Dependencies

  • Depends on: S001 (CLI Commands -- parity check and parity init are exercised by the test suite and CI), S002 (Rules System -- rule implementations are unit-tested), S003 (Coverage Readers -- coverage readers are tested with fixture files), S004 (Coverage Linkers -- linker implementations have dedicated Pest tests), S005 (Plugin System -- plugin loading is exercised in integration tests)
  • Required by: N/A (this is a foundational infrastructure spec)