Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,34 +29,27 @@ 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

- 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 }}
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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') }}
Expand All @@ -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
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
4 changes: 2 additions & 2 deletions tests/AbstractTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]);
Expand Down
Loading