Skip to content

Commit 482d224

Browse files
committed
Allow Phug 2
1 parent bd68b05 commit 482d224

3 files changed

Lines changed: 20 additions & 28 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: ['7.4']
16+
php: ['8.4']
1717
setup: ['stable']
1818

1919
name: PHP
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v5
2323

2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
@@ -29,34 +29,27 @@ jobs:
2929

3030
- name: Cache Composer packages
3131
id: composer-cache
32-
uses: actions/cache@v2
32+
uses: actions/cache@v4
3333
with:
3434
path: vendor
3535
key: ${{ runner.os }}-${{ matrix.setup }}-v2-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
3636
restore-keys: |
3737
${{ runner.os }}-${{ matrix.setup }}-v2-php-${{ matrix.php }}-
3838
39-
- name: Code Climate Test Reporter Preparation
40-
if: matrix.php == '7.4' && matrix.setup == 'stable'
41-
run: |
42-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
43-
chmod +x ./cc-test-reporter
44-
./cc-test-reporter before-build
45-
env:
46-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
47-
4839
- name: Install dependencies
4940
if: steps.composer-cache.outputs.cache-hit != 'true'
5041
run: composer update --prefer-dist --prefer-${{ matrix.setup }} --no-progress --no-interaction
5142

5243
- name: Run test suite
5344
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
5445

55-
- name: Code Climate Test Reporter
56-
if: ${{ matrix.php == '7.4' && matrix.setup == 'stable' && env.CC_TEST_REPORTER_ID != '' }}
57-
run: |
58-
cp coverage.xml clover.xml
59-
bash <(curl -s https://codecov.io/bash)
60-
./cc-test-reporter after-build --coverage-input-type clover --exit-code 0
61-
env:
62-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
46+
- name: Coverage - Qltysh
47+
uses: qltysh/qlty-action/coverage@v2
48+
with:
49+
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
50+
files: clover.xml
51+
52+
- name: Coverage - Codecov
53+
uses: codecov/codecov-action@v5
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/tests.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
16+
php: ['7.0', '7.1', '7.4', '8.0', '8.1', '8.4', '8.5']
1717
setup: ['lowest', 'stable']
1818

1919
name: PHP ${{ matrix.php }} - ${{ matrix.setup }}
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v5
2323

2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Cache Composer packages
3131
id: composer-cache
32-
uses: actions/cache@v2
32+
uses: actions/cache@v4
3333
with:
3434
path: vendor
3535
key: ${{ runner.os }}-${{ matrix.setup }}-v2-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
@@ -39,8 +39,7 @@ jobs:
3939
- name: Install dependencies
4040
if: steps.composer-cache.outputs.cache-hit != 'true'
4141
run: |
42-
${{ matrix.php >= 8.1 && 'composer require --no-update phpunit/phpunit:^8.5.15 --no-interaction;' || '' }}
43-
composer update --prefer-dist --prefer-${{ matrix.setup }} --no-progress --no-interaction ${{ matrix.php >= 8.1 && '--ignore-platform-req=php' || '' }}
42+
composer update --prefer-dist --prefer-${{ matrix.setup }} --no-progress --no-interaction
4443
4544
- name: Run test suite
4645
run: vendor/bin/phpunit --no-coverage --verbose

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
],
1212
"require": {
1313
"php": ">=7.0",
14-
"phug/compiler": "^1.0.0",
15-
"phug/formatter": "^1.0.0"
14+
"phug/compiler": "^1.0.0 || ^2.0.0",
15+
"phug/formatter": "^1.0.0 || ^2.0.0"
1616
},
1717
"require-dev": {
1818
"phug/phug": "^1.0.0",
19-
"phpunit/phpunit": "^6.5 || ^7.5 || ^8.5",
19+
"phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.52",
2020
"machy8/xhtml-formatter": "^1.0",
2121
"js-phpize/js-phpize-phug": "^2.1"
2222
},

0 commit comments

Comments
 (0)