diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a371857..3afcaae 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -13,13 +13,13 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4'] + php: ['8.4'] setup: ['stable'] name: PHP steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -29,22 +29,13 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-${{ matrix.setup }}-v2-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} restore-keys: | ${{ runner.os }}-${{ matrix.setup }}-v2-php-${{ matrix.php }}- - - name: Code Climate Test Reporter Preparation - if: matrix.php == '7.4' && matrix.setup == 'stable' - run: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - ./cc-test-reporter before-build - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' run: composer update --prefer-dist --prefer-${{ matrix.setup }} --no-progress --no-interaction @@ -52,11 +43,13 @@ jobs: - name: Run test suite run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml - - name: Code Climate Test Reporter - if: ${{ matrix.php == '7.4' && matrix.setup == 'stable' && env.CC_TEST_REPORTER_ID != '' }} - run: | - cp coverage.xml clover.xml - bash <(curl -s https://codecov.io/bash) - ./cc-test-reporter after-build --coverage-input-type clover --exit-code 0 - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + - name: Coverage - Qltysh + uses: qltysh/qlty-action/coverage@v2 + with: + token: ${{ secrets.QLTY_COVERAGE_TOKEN }} + files: clover.xml + + - name: Coverage - Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2defe96..ec2a226 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,13 +13,13 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] + php: ['7.0', '7.1', '7.4', '8.0', '8.1', '8.4', '8.5'] setup: ['lowest', 'stable'] name: PHP ${{ matrix.php }} - ${{ matrix.setup }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -29,7 +29,7 @@ jobs: - name: Cache Composer packages id: composer-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: vendor key: ${{ runner.os }}-${{ matrix.setup }}-v2-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} @@ -39,8 +39,7 @@ jobs: - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' run: | - ${{ matrix.php >= 8.1 && 'composer require --no-update phpunit/phpunit:^8.5.15 --no-interaction;' || '' }} - composer update --prefer-dist --prefer-${{ matrix.setup }} --no-progress --no-interaction ${{ matrix.php >= 8.1 && '--ignore-platform-req=php' || '' }} + composer update --prefer-dist --prefer-${{ matrix.setup }} --no-progress --no-interaction - name: Run test suite run: vendor/bin/phpunit --no-coverage --verbose diff --git a/composer.json b/composer.json index c11f564..7fe6de9 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ ], "require": { "php": ">=7.0", - "phug/compiler": "^1.0.0", - "phug/formatter": "^1.0.0" + "phug/compiler": "^1.0.0 || ^2.0.0", + "phug/formatter": "^1.0.0 || ^2.0.0" }, "require-dev": { "phug/phug": "^1.0.0", - "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5", + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.52", "machy8/xhtml-formatter": "^1.0", "js-phpize/js-phpize-phug": "^2.1" }, diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index 8eadaba..3d9952b 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -26,9 +26,9 @@ protected function getRenderer(): Renderer { if (!isset($this->renderer)) { $this->renderer = new Renderer([ - 'debug' => true, + 'debug' => true, 'execution_max_time' => 180000, - 'modules' => array_merge([ + 'modules' => array_merge([ PhugBemto::class, ], $this->modules), ]);