Skip to content

Commit 27c6e25

Browse files
committed
Speed up tests with parallel execution
1 parent e6b6e71 commit 27c6e25

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ $ composer run install:tools # Install phpDocumentor using phive
117117
After following the steps shown above, ZipStream-PHP's test suite is run like
118118
this:
119119

120+
Make sure `xdebug` is installed for test coverage.
121+
120122
```bash
121123
$ composer run test:unit
122124
```

.github/workflows/part_test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ jobs:
7373
if: matrix.php == 'nightly'
7474
run: composer install --prefer-dist --ignore-platform-req=php+
7575
- name: Run PHPUnit
76-
run: composer run test:unit
77-
env:
78-
XDEBUG_MODE: coverage
76+
run: composer run test:unit:cov
7977
- name: Upload coverage results to Coveralls
8078
env:
8179
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

composer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"mikey179/vfsstream": "^1.6",
3434
"php-coveralls/php-coveralls": "^2.5",
3535
"friendsofphp/php-cs-fixer": "^3.16",
36-
"vimeo/psalm": "^6.0"
36+
"vimeo/psalm": "^6.0",
37+
"brianium/paratest": "^7.7"
3738
},
3839
"suggest": {
3940
"psr/http-message": "^2.0",
@@ -46,9 +47,12 @@
4647
"@test:formatted",
4748
"@test:lint"
4849
],
49-
"test:unit": "phpunit --coverage-clover=coverage.clover.xml --coverage-html cov",
50+
"test:unit": "paratest --functional",
51+
"test:unit:cov": "XDEBUG_MODE=coverage paratest --functional --coverage-clover=coverage.clover.xml --coverage-html cov",
5052
"test:unit:slow": "@test:unit --group slow",
53+
"test:unit:slow:cov": "@test:unit:cov --group slow",
5154
"test:unit:fast": "@test:unit --exclude-group slow",
55+
"test:unit:fast:cov": "@test:unit:cov --exclude-group slow",
5256
"test:formatted": "@format --dry-run --stop-on-violation --using-cache=no",
5357
"test:lint": "psalm --stats --show-info=true --find-unused-psalm-suppress",
5458
"coverage:report": "php-coveralls --coverage_clover=coverage.clover.xml --json_path=coveralls-upload.json --insecure",

0 commit comments

Comments
 (0)