diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 05e5fe7..8756482 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,9 +36,11 @@ jobs: restore-keys: dependencies-${{ matrix.php }}-${{ matrix.stability }}-composer- - name: Install dependencies run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction -# - name: Check coding style -# run: php-cs-fixer fix --dry-run --allow-risky=true --format=checkstyle | cs2pr + - name: Check coding style + run: composer run style:check -- --format=checkstyle | cs2pr + - name: Check static analysis + run: composer run analyze -- --error-format=checkstyle | cs2pr - name: Configure matchers for PHPUnit uses: mheap/phpunit-matcher-action@v1 - - name: Run PHP tests via PHPUnit - run: vendor/bin/pest --teamcity + - name: Run PHP tests + run: composer run tests:ci diff --git a/composer.json b/composer.json index d0bb575..c376eb7 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,8 @@ "mockery/mockery": "^1.4.4", "orchestra/testbench": "^9.0", "pestphp/pest": "^2.28", - "phpstan/phpstan": "^2.0" + "phpstan/phpstan": "^2.0", + "staabm/annotate-pull-request-from-checkstyle": "^1.8" }, "autoload": { "psr-4": { @@ -53,6 +54,9 @@ "tests": [ "rm -rf build", "XDEBUG_MODE=coverage php vendor/bin/pest" + ], + "tests:ci": [ + "vendor/bin/pest --teamcity" ] }, "extra": {