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
31 changes: 12 additions & 19 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@v4
- uses: actions/checkout@v5

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -36,27 +36,20 @@ 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

- 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 }}
7 changes: 4 additions & 3 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: ['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
Expand All @@ -39,11 +39,12 @@ 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;' || '' }}
${{ 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
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading