Skip to content

Cache the phpunit install between builds on CI #655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

stof
Copy link
Member

@stof stof commented Sep 20, 2017

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.

@javiereguiluz
Copy link
Member

Our test builds were reasonably fast ... but performance gains are always welcomed! Thank you.

@stof stof deleted the improve_travis branch September 20, 2017 17:33
@stof
Copy link
Member Author

stof commented Sep 20, 2017

thus, it gives an example for other projects using the Symfony bridge 😄

@stof
Copy link
Member Author

stof commented Sep 20, 2017

Note that the caching was not that bad already, as the bridge would still benefit from the composer cache when calling composer.

The impact of such caching was bigger on the symfony/symfony repo, where the composer cache is not persisted between builds (the magic we do to expose the local version of sub-components when running composer would hurt us if the cache was shared with next builds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants