diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..158b78a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: + pull_request: + +permissions: + contents: read + +env: + PHP_VERSION: '8.3' + COMPOSER_ROOT_VERSION: '1.2.0' + +jobs: + auto-review: + name: Auto review + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Configure PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ env.PHP_VERSION }} + + - name: Install dependencies + run: composer update --no-progress --optimize-autoloader + + - name: Run review + run: composer review + + tests: + name: Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Use PHP ${{ env.PHP_VERSION }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ env.PHP_VERSION }} + + - name: Install dependencies + run: composer update --no-progress --optimize-autoloader + + - name: Run tests + run: composer tests diff --git a/composer.json b/composer.json index be1edbe..c105a1d 100644 --- a/composer.json +++ b/composer.json @@ -46,9 +46,10 @@ }, "require-dev": { "phpmd/phpmd": "^2.15", - "phpstan/phpstan": "^1.12", - "phpunit/phpunit": "^11.5", + "phpunit/phpunit": "^12.1", + "phpstan/phpstan": "^2.1", "infection/infection": "^0.32", + "tiny-blocks/collection": "^1.10", "squizlabs/php_codesniffer": "^3.11" }, "scripts": { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e42932c..05a92df 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,6 +7,7 @@ parameters: - '#method#' - '#expects#' - '#should return#' + - '#is used zero times#' - '#type mixed supplied#' - '#not specify its types#' - '#no value type specified#'