diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 543e66d0..47a34c57 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -116,6 +116,40 @@ jobs: if: always() run: docker compose down -v + pest: + name: Pest (PHP ${{ matrix.php }}) + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + php: ["8.5"] + + steps: + - name: Checkout + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + with: + fetch-depth: 2 + + - name: Setup PHP, with composer and extensions + uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2 + with: + php-version: ${{ matrix.php }} + tools: phpunit + extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite + coverage: xdebug + + - name: Install Composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 + + - name: Install Pest + run: | + composer config allow-plugins.pestphp/pest-plugin true + composer require --dev pestphp/pest:^5.0 --no-interaction + + - name: Run Pest + run: composer run pest -- --no-coverage + code-quality: name: Check ${{ matrix.tool }} (PHP ${{ matrix.php }}) runs-on: ubuntu-latest diff --git a/composer.json b/composer.json index a826b26c..acd9a640 100644 --- a/composer.json +++ b/composer.json @@ -64,6 +64,7 @@ "codestyle": "php-cs-fixer fix", "coverage": "phpunit -c tests/phpunit-coverage.dist.xml --coverage-html=\".phpunit.cache/code-coverage\"", "phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon", + "infection": "infection --threads=4 --min-covered-msi=0", "phpunit": "phpunit -c phpunit.dist.xml", "rectify": [ "@rector", diff --git a/docker-compose.yml b/docker-compose.yml index e5bf9e03..ec57134e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: - ./:/work working_dir: /work - php: + php74: build: # Info to build the Docker image context: ./.docker # Specify where the Dockerfile is located (e.g. in the root directory of the project) dockerfile: PHP74-Dockerfile # Specify the name of the Dockerfile @@ -25,6 +25,18 @@ services: volumes: - ./:/var/www/project/ # Location of the project for php-fpm. Note this should be the same for NGINX.* + php: + build: + context: ./.docker + dockerfile: PHP85-Dockerfile + ports: + - 8112:80 + depends_on: + - init-volumes + - redmine-dev + volumes: + - ./:/var/www/project/ + redmine-dev: image: redmine:7.0.0 user: "33:33" diff --git a/infection.json.dist b/infection.json.dist new file mode 100644 index 00000000..2d779d88 --- /dev/null +++ b/infection.json.dist @@ -0,0 +1,10 @@ +{ + "source": { + "directories": [ + "src/" + ] + }, + "logs": { + "text": ".phpunit.cache/infection.log" + } +} diff --git a/pest.php b/pest.php new file mode 100644 index 00000000..b0301d7a --- /dev/null +++ b/pest.php @@ -0,0 +1,7 @@ +in('tests/Pest'); diff --git a/phpunit.dist.xml b/phpunit.dist.xml index ad9380c5..7e9ae376 100644 --- a/phpunit.dist.xml +++ b/phpunit.dist.xml @@ -9,7 +9,6 @@ displayDetailsOnIncompleteTests="true" displayDetailsOnSkippedTests="true" displayDetailsOnTestsThatTriggerDeprecations="true" - displayDetailsOnPhpunitDeprecations="true" displayDetailsOnTestsThatTriggerErrors="true" displayDetailsOnTestsThatTriggerNotices="true" displayDetailsOnTestsThatTriggerWarnings="true"