-
Notifications
You must be signed in to change notification settings - Fork 555
Automatic Build Testing
GitHub repositories support automatic build testing with the help of the continuous integration (CI) servers Travis and AppVeyor.
Both CI servers are hooked into a repository as a service. Every time a new commit is made to the repository, they can automatically build the project and run any tests that are specified. Travis & AppVeyor also have a central database where the service logs if the latest build of the repository passes the tests or not.
They test on different platforms. Travis builds the project and runs tests on linux and MacOSX. AppVeyor does the same on Windows. Having both enabled means that everybody can run and contribute to Crafty, no matter which platform (s)he codes on.
Note that Crafty currently isn't tested on OSX, because the appropriate environment takes a long time to boot.
The CI server runs the command npm test
from the root of the repository. The npm test
script is defined in the package.json
file, which in turn runs grunt check
. See Building for more info on what grunt check
does.
You can enable Travis & Appveyor for your fork of Crafty's repository. Each time you make a commit to your fork, the servers will test if your code passes all tests.
Additionally, when you submit a pull request to the original Crafty repository, each CI server will append a status message to your pull request. This status message will indicate whether your commits passed the tests or not.
The developers can then go ahead and merge your pull request, without fearing that your contribution may break the code.
Follow Step 1 and Step 2. You can skip the rest of the steps, as the required .travis.yml
file is already included in Crafty's repository.
Follow Step 1 and Step 2.
You can skip the rest of the steps, as the required appveyor.yml
file is already included in Crafty's repository.
However, make sure to add your project in the CI interface, by going to https://ci.appveyor.com, logging in and adding Crafty via the "Add repository" button.
If you just make little changes to your code (e.g. you update the readme) and you do not want the CI servers to automatically test your commit, you can skip a CI build by including a [ci skip]
or [skip ci]
line in your commit message.
See skipping a Travis build.
See skipping an AppVeyor build.