Skip to content

Commit d2268a5

Browse files
authored
Merge pull request #10 from hexydec/chore/maintenance
Upgraded `tests.yml` to a newer version of PHP, fix composer cache an…
2 parents 4c820ff + 4461ade commit d2268a5

3 files changed

Lines changed: 561 additions & 365 deletions

File tree

.github/workflows/tests.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,27 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v3
1111

12+
- name: Install PHP
13+
uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: '8.4'
16+
extensions: mbstring xdebug
17+
coverage: xdebug
18+
19+
- name: Get Composer cache directory
20+
id: composer-cache
21+
run: echo "dir=$(composer config cache-dir)" >> $GITHUB_OUTPUT
22+
1223
- name: Cache Composer dependencies
1324
uses: actions/cache@v3
1425
with:
15-
path: /tmp/composer-cache
26+
path: ${{ steps.composer-cache.outputs.dir }}
1627
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
1728

18-
- uses: php-actions/composer@v5
19-
with:
20-
php_version: 8.1
21-
php_extensions: mbstring xdebug
29+
- run: composer install --no-interaction --prefer-dist
30+
31+
- name: PHPStan Analysis
32+
run: ./vendor/bin/phpstan analyse --memory-limit=512M
2233

2334
- name: PHPUnit Tests
2435
run: ./vendor/bin/phpunit
@@ -29,3 +40,4 @@ jobs:
2940
uses: codecov/codecov-action@v3
3041
with:
3142
files: ./coverage/result.xml
43+
token: ${{ secrets.CODECOV_TOKEN }}

composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"keywords": ["css", "stylesheet", "minifier", "minify", "parser", "compiler"],
1515
"minimum-stability": "stable",
1616
"require": {
17-
"php": ">=8.1",
18-
"hexydec/tokenise": "1.0.3"
17+
"php": ">=8.4",
18+
"hexydec/tokenise": "1.0.4"
1919
},
2020
"autoload": {
2121
"classmap": ["src/"]
@@ -25,7 +25,10 @@
2525
"test": "phpunit"
2626
},
2727
"require-dev": {
28-
"phpunit/phpunit": "^10.5",
29-
"phpstan/phpstan": "^1.10"
28+
"phpunit/phpunit": "^13.0",
29+
"phpstan/phpstan": "^2.0"
30+
},
31+
"config": {
32+
"discard-changes": true
3033
}
3134
}

0 commit comments

Comments
 (0)