Skip to content

Commit affa551

Browse files
mfnbarryvdh
andauthoredSep 7, 2020
[TESTS] Running in CI should not create but rather fail on missing snapshots (#1039)
* tests: running in CI should not create but rather fail on missing snapshots Otherwise they get created on the CI infrastructure but that's it, the build won't fail although it was forgotten to add the snapshot. * Bump minimum phpunit version which correctly accepts the `-d` parameter The `prefer-lowest` version we get with L6 is 8.0.0 which throws this error: ``` PHP Fatal error: Uncaught TypeError: ini_set() expects parameter 2 to be string, bool given in /home/runner/work/laravel-ide-helper/laravel-ide-helper/vendor/phpunit/phpunit/src/TextUI/Command.php:379 ``` * Update composer.json Co-authored-by: Barry vd. Heuvel <barryvdh@gmail.com>
1 parent b7d8478 commit affa551

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎.github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
4747
4848
- name: Execute Unit Tests
49-
run: composer test
49+
run: composer test-ci

‎composer.json

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"illuminate/view": "^6 || ^7 || ^8",
3737
"mockery/mockery": "^1.3",
3838
"orchestra/testbench": "^4 || ^5 || ^6",
39+
"phpunit/phpunit": "^8.5 || ^9",
3940
"spatie/phpunit-snapshot-assertions": "^1.4 || ^2.2 || ^3",
4041
"vimeo/psalm": "^3.12"
4142
},
@@ -75,6 +76,7 @@
7576
"php-cs-fixer fix --config=.php_cs.tests.php"
7677
],
7778
"test": "phpunit",
79+
"test-ci": "phpunit -d --without-creating-snapshots",
7880
"test-regenerate": "phpunit -d --update-snapshots"
7981
}
8082
}

0 commit comments

Comments
 (0)
Please sign in to comment.