phpunit
PHPUnit's `There were N failures` block through to its `FAILURES`/`ERRORS`/`OK` footer.
phptesttoolmatcher
Install: ci-doctor matchers add official/phpunit
matchers/php/phpunit/matcher.yaml
id: phpunitrole: toolclassification: [php, test]description: PHPUnit's `There were N failures` block through to its `FAILURES`/`ERRORS`/`OK` footer.start: ^There (was|were) \d+ (failure|error)end: ^(FAILURES|ERRORS|OK)
In bundles
Fixtures
Framing stripped per provider. Highlighted lines are what this matcher selects; the marked line is the anchor.
phpunit_failureOpen in playground
1Current runner version: '2.336.0'
2##[group]Operating System
3Ubuntu
424.04.4
5LTS
6##[endgroup]
7Secret source: Actions
8Prepare workflow directory
9Prepare all required actions
10Complete job name: phpunit_failure
11##[group]Set up job
12Image: ubuntu-24.04
13Runner name: 'GitHub Actions 12'
14##[endgroup]
15Download action repository 'actions/checkout@v4'
16Download action repository 'actions/cache@v4'
17##[group]Run actions/checkout@v4
18 with:
19 fetch-depth: 20
20 lfs: false
21##[endgroup]
22Syncing repository: acme/ledger
23##[group]Getting Git version info
24Working directory is '/home/runner/work/ledger/ledger'
25##[endgroup]
26/usr/bin/git checkout --progress --force 8ad41f02
27##[group]Run actions/cache@v4
28 with:
29 path: ~/.cache
30 key: Linux-deps-8ad41f02
31##[endgroup]
32Received 41943040 of 41943040 (100.0%), 40.0 MBs/sec
33Cache restored from key: Linux-deps-8ad41f02
34##[group]Run php --version
35php --version
36composer install --no-interaction --no-progress
37vendor/bin/phpunit --colors=never
38shell: /usr/bin/bash -e {0}
39##[endgroup]
40PHP 8.3.7 (cli) (built: May 15 2024 10:22:11) (NTS)
41Installing dependencies from lock file (including require-dev)
42Generating optimized autoload files
43PHPUnit 10.5.20 by Sebastian Bergmann and contributors.
44
45Runtime: PHP 8.3.7
46Configuration: /builds/team/shop/phpunit.xml
47
48...............F......... 25 / 25 (100%)
49
50Time: 00:01.284, Memory: 24.00 MB
51
52There was 1 failure:
53
541) App\Tests\Pricing\VatCalculatorTest::testAppliesReducedRate
55Failed asserting that 2000 matches expected 1900.
56
57/builds/team/shop/tests/Pricing/VatCalculatorTest.php:41
58
59FAILURES!
60Tests: 25, Assertions: 63, Failures: 1.
61##[error]Process completed with exit code 1.
62##[group]Post Run actions/checkout@v4
63##[endgroup]
64/usr/bin/git version
65git version 2.54.0
66##[group]Post Run actions/upload-artifact@v4
67##[endgroup]
68Artifact upload complete.
69Post job cleanup.
70Cleaning up orphan processes
1Running with gitlab-runner 16.10.0 (be4e0e33)
2 on php-runner-01 Ph7Yu2Nb, system ID: s_bb88cc77dd66
3Preparing the "docker" executor
4 Using Docker executor with image php:8.3-cli ...
5Using Docker executor with image php:8.3-cli ...
6Using docker image sha256:3e2d1c0b9a87 for php:8.3-cli with digest php@sha256:5a4b...
7Preparing environment
8Running on runner-ph7yu2nb-project-53-concurrent-0...
9Fetching changes...
10Checking out 7be3f1a0 as detached HEAD...
11Checking cache for composer-8.3-default...
12Successfully extracted cache
13$ php --version
14PHP 8.3.7 (cli) (built: May 15 2024 10:22:11) (NTS)
15$ composer install --no-interaction --no-progress
16Installing dependencies from lock file (including require-dev)
17Generating optimized autoload files
18$ vendor/bin/phpunit --colors=never
19PHPUnit 10.5.20 by Sebastian Bergmann and contributors.
20
21Runtime: PHP 8.3.7
22Configuration: /builds/team/shop/phpunit.xml
23
24...............F......... 25 / 25 (100%)
25
26Time: 00:01.284, Memory: 24.00 MB
27
28There was 1 failure:
29
301) App\Tests\Pricing\VatCalculatorTest::testAppliesReducedRate
31Failed asserting that 2000 matches expected 1900.
32
33/builds/team/shop/tests/Pricing/VatCalculatorTest.php:41
34
35FAILURES!
36Tests: 25, Assertions: 63, Failures: 1.
37Running after_script
38$ echo "phpunit failed, skipping deploy"
39phpunit failed, skipping deploy
40Uploading artifacts for failed job
41Uploading artifacts as "archive" to coordinator... 201 Created
42ERROR: Job failed: exit code 1