From a21ed3ca58ef36a48d3bdbca7f6b5f90f5c4ab73 Mon Sep 17 00:00:00 2001 From: Bastien Miclo Date: Sun, 15 Mar 2026 14:34:19 +0100 Subject: [PATCH 1/2] Allow Phug 2 --- .github/workflows/coverage.yml | 31 ++++++++++++------------------- .github/workflows/tests.yml | 6 +++--- composer.json | 10 +++++----- 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6947c7d..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@v4 + - uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -36,15 +36,6 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.setup }}-v2-php-${{ matrix.php }}- - - name: Code Climate Test Reporter Preparation - if: ${{ env.CC_TEST_REPORTER_ID != '' }} - 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: ${{ 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 288a5fe..d7360ac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,13 +13,13 @@ jobs: strategy: fail-fast: false matrix: - php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] + php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] setup: ['lowest', 'stable'] name: PHP ${{ matrix.php }} - ${{ matrix.setup }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -43,7 +43,7 @@ jobs: ${{ matrix.php >= 7.4 && 'composer require --no-update "pug-php/pug:^2.7.6||^3.0" --no-interaction;' || '' }} ${{ matrix.php >= 8 && 'composer require --no-update phpunit/phpunit:^8.5.15 --no-interaction;' || '' }} ${{ matrix.php >= 8 && 'composer require --no-update natxet/cssmin:^3.0.5 --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 44d4e78..04737f4 100644 --- a/composer.json +++ b/composer.json @@ -6,11 +6,11 @@ "license": "MIT", "require": { "php": ">=5.5", - "phug/compiler": "^0.5.2 || ^1.0.0", - "phug/formatter": "^0.5.13 || ^1.0.0", - "phug/lexer": "^0.5.4 || ^1.0.0", - "phug/parser": "^0.5.2 || ^1.0.0", - "phug/util": "^0.4.17 || ^1.0.0" + "phug/compiler": "^0.5.2 || ^1.0.0 || ^2.0.0", + "phug/formatter": "^0.5.13 || ^1.0.0 || ^2.0.0", + "phug/lexer": "^0.5.4 || ^1.0.0 || ^2.0.0", + "phug/parser": "^0.5.2 || ^1.0.0 || ^2.0.0", + "phug/util": "^0.4.17 || ^1.0.0 || ^2.0.0" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^8.5.15" From 31ea55bacb9b6d7965e95a29b341129bb1801159 Mon Sep 17 00:00:00 2001 From: Bastien Miclo Date: Sun, 15 Mar 2026 14:37:21 +0100 Subject: [PATCH 2/2] Fix tests for PHP < 7.1 --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d7360ac..1fdd844 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,6 +39,7 @@ jobs: - name: Install dependencies if: steps.composer-cache.outputs.cache-hit != 'true' run: | + ${{ matrix.php < 7.1 && 'composer require --no-update "phug/compiler:^1" --no-interaction;' || '' }} ${{ matrix.php >= 7.3 && 'composer require --no-update "pug-php/pug:^2.7.5||^3.0" --no-interaction;' || '' }} ${{ matrix.php >= 7.4 && 'composer require --no-update "pug-php/pug:^2.7.6||^3.0" --no-interaction;' || '' }} ${{ matrix.php >= 8 && 'composer require --no-update phpunit/phpunit:^8.5.15 --no-interaction;' || '' }}