Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rela589n committed Nov 18, 2023
1 parent 1f68e38 commit 0187a2a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 5 deletions.
35 changes: 32 additions & 3 deletions .github/workflows/ci.yaml
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: 'Validate composer.json'
run: composer validate --strict --ansi

code-analysis:
code-style:
needs: composer-validate
name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
Expand All @@ -28,8 +28,36 @@ jobs:
run: vendor/bin/ecs check --no-progress-bar --ansi
- name: 'Rector'
run: vendor/bin/rector process --dry-run --no-progress-bar --ansi
steps:
- name: 'Checkout Code'
uses: actions/checkout@v4

- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
coverage: none
tools: composer:v2

- name: 'Install Dependencies'
uses: "ramsey/composer-install@v2"
with:
composer-options: "--optimize-autoloader"

- run: ${{ matrix.actions.run }}
static-analysis:
needs: composer-validate
runs-on: ubuntu-latest
name: ${{ matrix.actions.name }} (${{ matrix.php }}, ${{ matrix.dependencies }})
strategy:
fail-fast: false
matrix:
php: [ '8.0', '8.2' ]
dependencies: [ highest, lowest ]
actions:
- name: 'Psalm'
run: vendor/bin/psalm --stats --no-progress --output-format=github --threads=$(nproc)

- name: 'PHPStan'
run: vendor/bin/phpstan analyze --no-progress --error-format=github --ansi --configuration=phpstan.dist.neon ./
steps:
Expand All @@ -39,14 +67,15 @@ jobs:
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2

- name: 'Install Dependencies'
uses: "ramsey/composer-install@v2"
with:
composer-options: "--optimize-autoloader"
dependency-versions: ${{ matrix.dependencies }}

- run: ${{ matrix.actions.run }}
test:
Expand Down Expand Up @@ -78,7 +107,7 @@ jobs:
run: vendor/bin/phpunit --testdox --colors=always --configuration=phpunit.xml.dist

code-coverage:
needs: test
needs: [ test, static-analysis ]
name: PHPUnit Coverage
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions Accessor/TestContainerAccessor.php
Expand Up @@ -8,6 +8,7 @@
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\DependencyInjection\ContainerInterface;

/** @internal */
final class TestContainerAccessor
{
/** @param class-string<KernelTestCase> $testClassName */
Expand Down
1 change: 1 addition & 0 deletions Clearer/CacheItemPoolsClearer.php
Expand Up @@ -11,6 +11,7 @@
use function array_map;
use function sprintf;

/** @internal */
final class CacheItemPoolsClearer
{
public function __construct(
Expand Down
1 change: 1 addition & 0 deletions Clearer/TestClearer.php
Expand Up @@ -16,6 +16,7 @@
use function is_a;
use function strtok;

/** @internal */
final class TestClearer
{
private TestContainerAccessor $containerAccessor;
Expand Down
6 changes: 5 additions & 1 deletion DependencyInjection/PhdCacheTestExtension.php
Expand Up @@ -11,7 +11,11 @@ final class PhdCacheTestExtension extends Extension
{
public const ALIAS = 'phd_cache_test';

/** @override */
/**
* @param array<array-key,mixed> $configs
*
* @override
*/
public function load(array $configs, ContainerBuilder $container): void
{
// nothing to do yet
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -27,7 +27,7 @@
"vimeo/psalm": "^5.15",
"psalm/plugin-phpunit": "^0.18.4",
"symplify/easy-coding-standard": "^12.0",
"phphd/coding-standard": "@dev",
"phphd/coding-standard": "0.3.*",
"phpstan/phpstan-phpunit": "^1.3"
},
"repositories": [
Expand Down

0 comments on commit 0187a2a

Please sign in to comment.