Repository navigation
Count functional tests towards code coverage - #95
Merged
Merged
Conversation
setono/sylius-plugin 2.5.0 gave the code-coverage action a symfony input, which
it passes to Flex as SYMFONY_REQUIRE like the matrix jobs do. Without it, the
Symfony packages that only arrive transitively (symfony/var-exporter,
symfony/type-info, ...) are not held to 7.4. That is harmless on the action's
default PHP 8.3, where Symfony 8 can't be installed, but on PHP 8.4 it mixes
Symfony 8 components into a 7.4 application. symfony/var-exporter 8 then breaks
the kernel boot with doctrine/orm 3.6 ("Symfony LazyGhost is not available"),
which is exactly what the functional tests in the coverage job now do.
Since setono/sylius-plugin 2.5.0, the code-coverage action sets up the test application like the functional tests do (MySQL, assets, schema, fixtures), so the functional suite's coverage counts towards the 90% target. See Setono/sylius-plugin#5.
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.
Follow-up to Setono/sylius-plugin#5, released in setono/sylius-plugin 2.5.0. The
code-coverageaction now sets up the test application likefunctional-testsdoes: MySQL, assets, schema and fixtures. It then runs all PHPUnit suites with pcov, so the functional suite's coverage counts towards the 90% Codecov target. The skeleton usescode-coverage@v2, so that part needs no workflow change. This PR's CI run is the first skeleton run on the new action.Changes
build.yaml: passsymfony: "~7.4.0"to the coverage job, the new input 2.5.0 added, like the matrix jobs do.SYMFONY_REQUIREalso holds the Symfony packages that only arrive transitively (symfony/var-exporter,symfony/type-info, …) to 7.4.symfony/var-exporter8 breaks the kernel boot with doctrine/orm 3.6 ("Symfony LazyGhost is not available").~7.4.0locked 0 of 76 Symfony packages at 8.x, and the functional tests passed.CLAUDE.md:--coverage-textcheck notes that the functional suite needs the test application's database.