Skip to content

Commit

Permalink
Fix workflows and update some dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 committed Sep 1, 2020
1 parent f48b1ed commit 1b20b75
Show file tree
Hide file tree
Showing 37 changed files with 306 additions and 266 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ci.yaml
Expand Up @@ -8,34 +8,40 @@ on:
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allowed_to_fail }}
strategy:
matrix:
php: ['7.4']
dependencies: [highest, lowest]
composer: [v2]
php: ['7.3', '7.4']
dependencies: [highest]
allowed_to_fail: [false]
include:
- php: '7.3'
dependencies: lowest
allowed_to_fail: false
- php: '8.0'
dependencies: highest
composer: v1
allowed_to_fail: true
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: pcov.directory=packages
coverage: pcov
tools: composer:${{ matrix.composer }}
tools: composer:v2
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.composer }}-${{ matrix.dependencies }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
- if: matrix.php == '8.0'
run: composer config platform.php 7.4.99
- if: matrix.dependencies == 'lowest'
run: composer update --no-interaction --no-progress --prefer-lowest
run: composer update --no-interaction --no-progress --prefer-stable --prefer-lowest
- if: matrix.dependencies == 'highest'
run: composer update --no-interaction --no-progress
run: composer update --no-interaction --no-progress --prefer-stable
- run: vendor/bin/phpunit --coverage-clover=clover.xml
- uses: codecov/codecov-action@v1
2 changes: 1 addition & 1 deletion .github/workflows/monorepo.yaml
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer
- run: composer update --prefer-dist --no-progress --no-interaction
- run: composer update --no-interaction --no-progress --prefer-stable
- run: vendor/bin/monorepo-builder split --max-processes 7
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/qa.yaml
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer
- run: composer update --prefer-dist --no-progress --no-interaction --no-scripts
- run: composer update --no-interaction --no-progress --prefer-stable --no-scripts
- run: composer php-cs-fixer -- --dry-run --format=checkstyle | cs2pr
- run: vendor/bin/phpunit
- run: composer phpstan
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/split_ci.yaml
Expand Up @@ -38,7 +38,7 @@ jobs:
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.packages }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-
- run: cd packages/${{ matrix.packages }} && composer validate --strict
- run: composer update --no-interaction --no-progress
- run: composer update --no-interaction --no-progress --prefer-stable
- run: vendor/bin/monorepo-builder localize-composer-paths
- run: cd packages/${{ matrix.packages }} && composer update --no-interaction --no-progress
- run: cd packages/${{ matrix.packages }} && composer update --no-interaction --no-progress --prefer-stable
- run: cd packages/${{ matrix.packages }} && vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -14,7 +14,7 @@
"friendsofsymfony/ckeditor-bundle": "^1.2 || ^2.2",
"gedmo/doctrine-extensions": "^2.4",
"knplabs/doctrine-behaviors": "^2.0.6",
"phpunit/phpunit": "^9.1.3",
"phpunit/phpunit": "^9.3",
"sonata-project/admin-bundle": "^3.68",
"sonata-project/doctrine-extensions": "^1.9",
"sonata-project/doctrine-orm-admin-bundle": "^3.20",
Expand Down Expand Up @@ -70,7 +70,7 @@
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpstan/phpstan-symfony": "^0.12",
"psalm/plugin-phpunit": "^0.10",
"psalm/plugin-phpunit": "^0.12",
"psalm/plugin-symfony": "^1.2",
"psr/event-dispatcher": "^1.0",
"symfony/phpunit-bridge": "^5.1",
Expand Down
3 changes: 2 additions & 1 deletion monorepo-builder.yaml
Expand Up @@ -9,7 +9,8 @@ parameters:
phpstan/phpstan-phpunit: ^0.12
phpstan/phpstan-symfony: ^0.12
phpstan/phpstan-strict-rules: ^0.12
psalm/plugin-phpunit: ^0.10
phpunit/phpunit: ^9.3
psalm/plugin-phpunit: ^0.12
psalm/plugin-symfony: ^1.2
symplify/changelog-linker: ^8.0
symplify/monorepo-builder: ^8.0
Expand Down
2 changes: 1 addition & 1 deletion packages/basic-page-bundle/composer.json
Expand Up @@ -45,7 +45,7 @@
"nelmio/alice": "^3.7",
"phpspec/prophecy": "^1.11.1",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.1.3",
"phpunit/phpunit": "^9.3",
"runroom-packages/testing": "^0.9",
"symfony/framework-bundle": "^4.4 || ^5.1",
"symfony/phpunit-bridge": "^5.1",
Expand Down
35 changes: 19 additions & 16 deletions packages/basic-page-bundle/phpunit.xml.dist
@@ -1,32 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<testsuite name="RunroomBasicPageBundle">
<directory>tests</directory>
</testsuite>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>

<filter>
<whitelist>
<coverage>
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
</coverage>

<php>
<ini name="precision" value="8"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
<env name="KERNEL_CLASS" value="Runroom\BasicPageBundle\Tests\App\Kernel" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
<env name="KERNEL_CLASS" value="Runroom\BasicPageBundle\Tests\App\Kernel"/>
</php>
</phpunit>
16 changes: 8 additions & 8 deletions packages/basic-page-bundle/tests/App/Kernel.php
Expand Up @@ -78,35 +78,35 @@ public function getProjectDir(): string
return __DIR__;
}

protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader): void
{
$container->setParameter('kernel.default_locale', 'en');
$c->setParameter('kernel.default_locale', 'en');

$container->loadFromExtension('framework', [
$c->loadFromExtension('framework', [
'test' => true,
'router' => ['utf8' => true],
'secret' => 'secret',
]);

$container->loadFromExtension('security', [
$c->loadFromExtension('security', [
'firewalls' => ['main' => ['anonymous' => true]],
]);

$container->loadFromExtension('doctrine', [
$c->loadFromExtension('doctrine', [
'dbal' => ['url' => 'sqlite://:memory:', 'logging' => false],
'orm' => ['auto_mapping' => true],
]);

$container->loadFromExtension('twig', [
$c->loadFromExtension('twig', [
'exception_controller' => null,
'strict_variables' => '%kernel.debug%',
]);

$container->loadFromExtension('a2lix_translation_form', [
$c->loadFromExtension('a2lix_translation_form', [
'locales' => ['es', 'en', 'ca'],
]);

$container->loadFromExtension('runroom_seo', [
$c->loadFromExtension('runroom_seo', [
'locales' => ['es', 'en', 'ca'],
'xdefault_locale' => 'es',
'class' => ['media' => Media::class],
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor-sonata-media-bundle/composer.json
Expand Up @@ -34,7 +34,7 @@
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"phpspec/prophecy": "^1.11.1",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.1.3",
"phpunit/phpunit": "^9.3",
"runroom-packages/testing": "^0.9",
"symfony/phpunit-bridge": "^5.1"
},
Expand Down
35 changes: 19 additions & 16 deletions packages/ckeditor-sonata-media-bundle/phpunit.xml.dist
@@ -1,32 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<testsuite name="RunroomCkeditorSonataMediaBundle">
<directory>tests</directory>
</testsuite>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>

<filter>
<whitelist>
<coverage>
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
</coverage>

<php>
<ini name="precision" value="8"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
<env name="KERNEL_CLASS" value="Runroom\CkeditorSonataMediaBundle\Tests\App\Kernel" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
<env name="KERNEL_CLASS" value="Runroom\CkeditorSonataMediaBundle\Tests\App\Kernel"/>
</php>
</phpunit>
12 changes: 6 additions & 6 deletions packages/ckeditor-sonata-media-bundle/tests/App/Kernel.php
Expand Up @@ -68,29 +68,29 @@ public function getProjectDir(): string
return __DIR__;
}

protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader): void
{
$container->loadFromExtension('framework', [
$c->loadFromExtension('framework', [
'test' => true,
'router' => ['utf8' => true],
'secret' => 'secret',
]);

$container->loadFromExtension('security', [
$c->loadFromExtension('security', [
'firewalls' => ['main' => ['anonymous' => true]],
]);

$container->loadFromExtension('doctrine', [
$c->loadFromExtension('doctrine', [
'dbal' => ['url' => 'sqlite://:memory:', 'logging' => false],
'orm' => ['auto_mapping' => true],
]);

$container->loadFromExtension('twig', [
$c->loadFromExtension('twig', [
'exception_controller' => null,
'strict_variables' => '%kernel.debug%',
]);

$container->loadFromExtension('sonata_media', [
$c->loadFromExtension('sonata_media', [
'default_context' => 'default',
'contexts' => ['default' => []],
'cdn' => null,
Expand Down
2 changes: 1 addition & 1 deletion packages/cookies-bundle/composer.json
Expand Up @@ -43,7 +43,7 @@
"nelmio/alice": "^3.7",
"phpspec/prophecy": "^1.11.1",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.1.3",
"phpunit/phpunit": "^9.3",
"runroom-packages/testing": "^0.9",
"symfony/phpunit-bridge": "^5.1",
"theofidry/alice-data-fixtures": "^1.2"
Expand Down
35 changes: 19 additions & 16 deletions packages/cookies-bundle/phpunit.xml.dist
@@ -1,32 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
>
<testsuite name="RunroomCookiesBundle">
<directory>tests</directory>
</testsuite>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>

<filter>
<whitelist>
<coverage>
<include>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</include>
</coverage>

<php>
<ini name="precision" value="8"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
<env name="KERNEL_CLASS" value="Runroom\CookiesBundle\Tests\App\Kernel" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0"/>
<env name="KERNEL_CLASS" value="Runroom\CookiesBundle\Tests\App\Kernel"/>
</php>
</phpunit>

0 comments on commit 1b20b75

Please sign in to comment.