Skip to content

Commit

Permalink
Update composer and CI workflow for better test coverage
Browse files Browse the repository at this point in the history
Updated composer.json to enhance PHPUnit test coverage options and added 'infection-ci' for CI testing. Modified CI workflow to use 'infection-ci' for more efficient infection testing across different PHP versions.
  • Loading branch information
Dropelikeit committed May 13, 2024
1 parent 58ccece commit f8ab32a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: "composer lint"

- name: "Run infection"
run: "composer infection"
run: "composer infection-ci"

php82:
name: PHP 8.2
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
run: "composer lint"

- name: "Run infection"
run: "composer infection"
run: "composer infection-ci"

php83:
name: PHP 8.3
Expand Down Expand Up @@ -136,4 +136,4 @@ jobs:
- name: "Run infection"
env:
INFECTION_BADGE_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
run: "composer infection"
run: "composer infection-ci"
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@
"cs-check": "php-cs-fixer -v --dry-run --using-cache=no fix",
"cs-fix": "php-cs-fixer --using-cache=no fix",
"test": "export XDEBUG_MODE=coverage && phpunit",
"test-coverage": "export XDEBUG_MODE=coverage && phpunit --coverage-clover build/logs/clover.xml --coverage-html build/logs/clover.html",
"test-coverage": "export XDEBUG_MODE=coverage && phpunit --coverage-xml build/logs --coverage-clover build/logs/clover.xml --coverage-html build/logs/clover.html --log-junit build/logs/junit.xml",
"analyze": "phpstan analyze --no-progress --memory-limit=-1 --xdebug",
"psalm": "psalm --no-cache -c psalm.xml",
"infection": "infection --threads=4",
"infection-ci": "infection --coverage=build/logs --threads=16",
"check": [
"@cs-check",
"@analyze",
Expand Down

0 comments on commit f8ab32a

Please sign in to comment.