Follow-up from the experimental PHP SDK review.
The PHP pre-merge test path currently builds the extension with a plain cargo build --manifest-path foreign/php/Cargo.toml, runs PHPUnit without producing a JUnit report, does not upload PHP test/coverage artifacts, and _test.yml has no PHP Codecov upload step. As a result, PHP changes do not feed the same CI reporting/dashboard path as Python and Node.
Scope
Coverage instrumentation:
- Install / make available
cargo llvm-cov for the PHP pre-merge action, following the Python action pattern.
- Wrap the test extension build in
.github/actions/php/pre-merge/action.yml with cargo llvm-cov environment setup at the current cargo build --manifest-path foreign/php/Cargo.toml point.
- Add a
cargo llvm-cov report --lcov step after the PHP SDK tests run and before the Iggy server stop step.
- Emit
reports/php-coverage.lcov or another stable LCOV path for PHP coverage.
- Adjust source paths if needed so Codecov attributes Rust extension coverage under
foreign/php/src/.
Test reports and artifacts:
- Pass a JUnit output path to PHPUnit, for example:
./scripts/test.sh --log-junit ../../reports/php-junit.xml
or wire the equivalent through foreign/php/scripts/test.sh / the PHP action.
- Ensure the reports directory exists before test/report generation.
- Upload the PHP JUnit XML and PHP LCOV file via
actions/upload-artifact.
Codecov wiring:
- Add a PHP Codecov upload call in
.github/workflows/_test.yml, matching the existing Python / Node shape:
files: reports/php-coverage.lcov
flags: php
disable_search: true
- preserve the existing Codecov token / PR override conventions.
- Also modify
.github/workflows/coverage-baseline.yml, which runs post-merge, so PHP coverage establishes the baseline dashboard data.
Files of interest
.github/actions/php/pre-merge/action.yml
foreign/php/scripts/test.sh
.github/workflows/_test.yml
.github/workflows/coverage-baseline.yml
Reference
The Python pre-merge action already wraps the equivalent Rust extension build with cargo llvm-cov, emits reports/python-coverage.lcov, uploads JUnit/coverage artifacts, and feeds Codecov. The PHP action should follow the same shape so PHP changes are visible in CI reporting and coverage dashboards.
Merged scope from duplicate issue: #3309
Related: #3302
Initial PHP SDK work: #3235
Follow-up from the experimental PHP SDK review.
The PHP pre-merge test path currently builds the extension with a plain
cargo build --manifest-path foreign/php/Cargo.toml, runs PHPUnit without producing a JUnit report, does not upload PHP test/coverage artifacts, and_test.ymlhas no PHP Codecov upload step. As a result, PHP changes do not feed the same CI reporting/dashboard path as Python and Node.Scope
Coverage instrumentation:
cargo llvm-covfor the PHP pre-merge action, following the Python action pattern..github/actions/php/pre-merge/action.ymlwithcargo llvm-covenvironment setup at the currentcargo build --manifest-path foreign/php/Cargo.tomlpoint.cargo llvm-cov report --lcovstep after the PHP SDK tests run and before the Iggy server stop step.reports/php-coverage.lcovor another stable LCOV path for PHP coverage.foreign/php/src/.Test reports and artifacts:
or wire the equivalent through
foreign/php/scripts/test.sh/ the PHP action.actions/upload-artifact.Codecov wiring:
.github/workflows/_test.yml, matching the existing Python / Node shape:files: reports/php-coverage.lcovflags: phpdisable_search: true.github/workflows/coverage-baseline.yml, which runs post-merge, so PHP coverage establishes the baseline dashboard data.Files of interest
.github/actions/php/pre-merge/action.ymlforeign/php/scripts/test.sh.github/workflows/_test.yml.github/workflows/coverage-baseline.ymlReference
The Python pre-merge action already wraps the equivalent Rust extension build with
cargo llvm-cov, emitsreports/python-coverage.lcov, uploads JUnit/coverage artifacts, and feeds Codecov. The PHP action should follow the same shape so PHP changes are visible in CI reporting and coverage dashboards.Merged scope from duplicate issue: #3309
Related: #3302
Initial PHP SDK work: #3235