Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use simple-phpunit on lowest #6316

Merged
merged 4 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,8 @@ jobs:
name: PHPUnit (PHP ${{ matrix.php }}) (Symfony lowest)
runs-on: ubuntu-latest
timeout-minutes: 20
env:
SYMFONY_PHPUNIT_VERSION: '9.5'
soyuka marked this conversation as resolved.
Show resolved Hide resolved
strategy:
matrix:
php:
Expand Down Expand Up @@ -1027,10 +1029,12 @@ jobs:
run: rm -Rf tests/Fixtures/app/var/cache/*
- name: Update project dependencies
run: composer update --prefer-lowest --no-interaction --no-progress --ansi
- name: Install PHPUnit
run: vendor/bin/simple-phpunit --version
- name: Clear test app cache
run: tests/Fixtures/app/console cache:clear --ansi
- name: Run PHPUnit tests
run: vendor/bin/phpunit
run: vendor/bin/simple-phpunit
env:
SYMFONY_DEPRECATIONS_HELPER: max[self]=0&ignoreFile=./tests/.ignored-deprecations

Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/guides.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ jobs:
KERNEL_CLASS: \ApiPlatform\Playground\Kernel
run: |
for d in guides/*.php; do
rm -f var/data.db
echo "Testing guide $d"
pdg-phpunit $d || exit 1
rm -f var/*.db
echo "Testing guide $d"
pdg-phpunit $d || exit 1
exit_status=$?
if [ $exit_status -ne 0 ]; then
exit $exit_status
fi
done
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"willdurand/negotiation": "^3.0"
},
"require-dev": {
"soyuka/pmu": "^0.0.2",
"behat/behat": "^3.11",
"behat/mink": "^1.9",
"doctrine/cache": "^1.11 || ^2.1",
Expand Down Expand Up @@ -68,6 +67,7 @@
"ramsey/uuid-doctrine": "^1.4 || ^2.0",
"sebastian/comparator": "<5.0",
"soyuka/contexts": "v3.3.9",
"soyuka/pmu": "^0.0.2",
"soyuka/stubs-mongodb": "^1.0",
"symfony/asset": "^6.4 || ^7.0",
"symfony/browser-kit": "^6.4 || ^7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ final class AttributeFilterPass implements CompilerPassInterface
public function process(ContainerBuilder $container): void
{
foreach (get_declared_classes() as $class) {
$this->createFilterDefinitions(new \ReflectionClass($class), $container);
$r = new \ReflectionClass($class);
if (str_contains((string) $r->getFileName(), 'guides')) {
$this->createFilterDefinitions($r, $container);
}
}
}

Expand Down
Loading