diff --git a/.gitattributes b/.gitattributes index 4e9eca84d..fb192d9bc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,6 +13,7 @@ /phpstan-baseline.php export-ignore /phpstan.neon.dist export-ignore /phpunit.xml.dist export-ignore +/pyrameter.php export-ignore /psalm_autoload.php export-ignore /psalm-baseline.xml export-ignore /psalm.xml export-ignore diff --git a/.github/workflows/phpunit-lang.yml b/.github/workflows/phpunit-lang.yml index 877f5f81a..04c8b00e1 100644 --- a/.github/workflows/phpunit-lang.yml +++ b/.github/workflows/phpunit-lang.yml @@ -59,7 +59,7 @@ jobs: fi - name: Test with PHPUnit - run: vendor/bin/phpunit --no-coverage --testsuite lang + run: PYRAMETER_DISABLED=1 vendor/bin/phpunit --no-coverage --testsuite lang env: TERM: xterm-256color TACHYCARDIA_MONITOR_GA: enabled diff --git a/composer.json b/composer.json index d621181c3..37a028450 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "codeigniter4/settings": "^2.1" }, "require-dev": { + "boundwize/pyrameter": "^0.5", "boundwize/structarmed": "0.14.16", "codeigniter/phpstan-codeigniter": "^2.0", "codeigniter4/devkit": "^1.3", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4d82a9068..e406d54f0 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -34,6 +34,7 @@ + diff --git a/pyrameter.php b/pyrameter.php new file mode 100644 index 000000000..4c04af314 --- /dev/null +++ b/pyrameter.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + +use Boundwize\Pyrameter\Config\PyrameterConfig; +use Boundwize\Pyrameter\TestKind; +use CodeIgniter\Test\FeatureTestTrait; +use Tests\Support\DatabaseTestCase; + +return PyrameterConfig::defaults() + ->usesClass( + DatabaseTestCase::class, + TestKind::Integration, + unless: [FeatureTestTrait::class], + ) + ->usesClass( + FeatureTestTrait::class, + TestKind::Functional, + ) + ->targetShape( + unit: ['min' => 40], + functional: ['max' => 10], + integration: ['max' => 50], + e2e: ['max' => 0], + ) + ->failOnViolation();