How to build & test your feature branch on your fork for free before submitting a pull request
Free CI for your GitHub forks
By Troy Lindsay
- 2 minutes read- 242 words
I had an epiphany the other day when troubleshooting an issue with a pull request that I had submitted, which is that you can have AppVeyor and Travis CI (free CI/CD services for public repos) build & test your commits to your fork’s feature branch on push by simply enabling the repo in your AppVeyor and/or Travis CI accounts.
In this instance, my changes had worked on my Fedora image, but the build failed on Travis CI’s Ubuntu Trusty image.
Had I thought of this beforehand, I would have been able to detect and resolve the issue before submitting the pull request.
This is especially useful if you are attempting to help augment and/or optimize the project’s build configuration.
Also, you can implement this even if the project doesn’t use either of these CI/CD services or if the owners do not store the build configuration in the respective YAML file.
The caveat is that in either case, you would have to configure the CI services yourself.
To start building & testing a new project in AppVeyor, go here, and for Travis CI, go to your profile page.
So far, I have used this methodology to provide screenshots and build logs as evidence in a couple of pull requests.
I have also used this to create and submit a Travis CI build configuration for a project that was only using AppVeyor and demonstrated how it would work if merged.
Pretty cool, right?