Potentially useful for fork owners to test out phar deployment without affecting
the official psalm/phar repo.
To enable phar deployments from your own fork of psalm:
- Enable builds with Travis
- Create a github repository to hold recieve the built phar packages
- Create a new dedicated github user for the deployments
- From your main github account, invite the new user to collobrate on the phar repository
- From the new user's account, accept the invitation
- From the new user's account, obtain a 'new personal access token' ( https://github.com/settings/tokens/new ) with repo scope
- In travis settings for your fork of psalm, set two environment
variables:
- PHAR_REPO_SLUG - this should be the name the phar repo you set up earlier, e.g. fred/phar
- GITHUB_TOKEN - This is the personal access token of the new user you obtained above. Anyone who knows this token
can push to the repository, so keep it secret. Make sure 'Display value in build log' is
switched off'
Now any push to branches in your fork of psalm, should automatically
result in a commit containing the phar file in your phar repository.
- Phar signing moved to build-phar.sh (conditional on gpg keys
availability)
- Tagged phar releases moved to travis-deploy-phar.sh
- `travis-deploy-phar.sh` is now triggered via `script` deploy provider
Deployment to `psalm/phar` repo is possible only when travis runs on the
main `vimeo/psalm` repository people, so only attempt to deploy there
when `$GITHUB_TOKEN` is available.
- Run phpcs once, not on every row of build matrix
- Start coverage builds only when regular test builds succeed
- Always build phar (to see if it builds)
- Automatically deploy psalm.phar on tag builds (no more missing phars)
Also fixesvimeo/psalm#921
* upgrade phpunit, test with low and high deps
* work around possibly-anonymous test cases introduced by newer PHPUnit
* Alternative TestCase::getName() nullability workaround
Previous workaround was failing due to PHP warnings on 7.1 or 7.2
(depending on specific signature). There's just no signature that would
be working for all 4 variants of (ver / dep) matrix.
* don't disable xdebug if it's not enabled
* allowed 7.0/high to fail until PHPUnit 6.5.10 is released
see sebastianbergmann/phpunit#3209