CI: fix Scrutinizer build (pin default-jammy image, drop external coverage)#17
Merged
Conversation
Scrutinizer was failing with "(stdin) is not a bzip2 file" — their php-package-mirror is not serving the requested 8.3.4 tarball, so their build aborts before our code is ever inspected. The pre-built default-jammy image bypasses the source compile entirely. Match the working pattern from mmucklo/email-parse: - Set build.image: default-jammy. - Drop build.environment.php (no version pinning means no source build). - Drop tools.external_code_coverage and run PHPUnit inside Scrutinizer (XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover=.coverage) so coverage is generated locally to the inspection. Workflow cleanup: - Remove the ocular install + upload steps from .github/workflows/ci.yml. They were the bridge for tools.external_code_coverage; with Scrutinizer generating coverage itself, the bridge is no longer needed. Codecov upload from GH Actions is preserved. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #17 +/- ##
=========================================
Coverage 98.07% 98.07%
Complexity 27 27
=========================================
Files 1 1
Lines 52 52
=========================================
Hits 51 51
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
phpcs-run requires either a directory argument or a phpcs.xml config file in the repo root, and we have neither — the step exits 1: No checking directory given, please add checking directory, e.g. 'phpcs-run ./'; Or add configuration file 'phpcs.xml' in root directory Matches the email-parse reference config (analysis runs php-scrutinizer-run only). Roadmap §7 already plans php-cs-fixer / pint in GH Actions, which will be stricter and deterministic than Scrutinizer's phpcs and won't depend on their container. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Scrutinizer was failing every inspection with:
```
[Downloading]: https://php-package-mirror.scrutinizer-ci.com/8.3.4.tar.bz2
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
BUILD ERROR
```
Their package mirror is no longer serving the 8.3.4 tarball. Because we pinned `build.environment.php: 8.3`, Scrutinizer was attempting to compile PHP from source and aborting before any analysis could run.
Fix
Match the proven-working pattern from `mmucklo/email-parse`:
Workflow cleanup
Removed the `ocular install` + `Upload coverage to Scrutinizer` steps from `.github/workflows/ci.yml`. Those steps existed to feed `external_code_coverage` from GH Actions; with Scrutinizer generating coverage itself, they're dead weight. The Codecov upload step is preserved.
Test plan
🤖 Generated with Claude Code