Skip to content

Commit 36a8ba0

Browse files
committed
minor #655 Cache the phpunit install between builds on CI (stof)
This PR was squashed before being merged into the master branch (closes #655). Discussion ---------- Cache the phpunit install between builds on CI This leverages the CI caches to avoid redownloading PHPUnit on each build with the bridge. This implies changing the folder in which it gets downloaded to allow caching without side-effects on the composer install (by default, the install happens in `vendor/symfony/phpunit-bridge/bin/.phpunit` but composer cleans existing folders when installing packages) This also separates the PHPUnit install from the run instead of relying on the lazy-install, to make the output more understandable (especially on Travis where the install part will get collapsed). Seeing a composer output when running tests can be confusing. Commits ------- a811273 Cache the phpunit install between builds on CI
2 parents 199477e + a811273 commit 36a8ba0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ sudo: false
44
cache:
55
directories:
66
- $HOME/.composer/cache/files
7+
- $HOME/symfony-bridge/.phpunit
8+
9+
env:
10+
global:
11+
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
712

813
matrix:
914
fast_finish: true
@@ -16,6 +21,7 @@ before_install:
1621

1722
install:
1823
- composer install
24+
- ./vendor/bin/simple-phpunit install
1925

2026
script:
2127
- ./vendor/bin/simple-phpunit

appveyor.yml

+3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ clone_folder: c:\projects\symfony-demo
44

55
cache:
66
- '%LOCALAPPDATA%\Composer\files'
7+
- '%LOCALAPPDATA%\SymfonyBridge\phpunit'
78
- c:\projects\symfony-demo\composer.phar
89

910
init:
1011
- SET PATH=c:\php;%PATH%
1112
- SET COMPOSER_NO_INTERACTION=1
1213
- SET SYMFONY_DEPRECATIONS_HELPER=strict
14+
- SET SYMFONY_PHPUNIT_DIR=%LOCALAPPDATA%\SymfonyBridge\phpunit
1315
- SET ANSICON=121x90 (121x90)
1416
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
1517

@@ -45,6 +47,7 @@ install:
4547
- IF %APPVEYOR_REPO_BRANCH%==master (SET COMPOSER_ROOT_VERSION=dev-master) ELSE (SET COMPOSER_ROOT_VERSION=%APPVEYOR_REPO_BRANCH%.x-dev)
4648
- php composer.phar update --no-progress --ansi
4749
- SET COMPOSER_ROOT_VERSION=
50+
- vendor\bin\simple-phpunit install
4851

4952
test_script:
5053
- cd c:\projects\symfony-demo

0 commit comments

Comments
 (0)