Travis integration: Difference between revisions
David Mudrak (talk | contribs) m (→Setup: Fix links syntax) |
No edit summary |
||
Line 24: | Line 24: | ||
# Click on the cog icon to configure the Integration | # Click on the cog icon to configure the Integration | ||
# Ensure that "Build only if .travis.yml is present" is enabled [[File:moodle-travis-settings.png]] | # Ensure that "Build only if .travis.yml is present" is enabled [[File:moodle-travis-settings.png]] | ||
=== How do I start a build? === | === How do I start a build? === |
Revision as of 03:42, 8 April 2016
Moodle core
Background
Moodle is regularly tested against a matrix of Databases, PHP Versions, and operating systems, however many developers do not have the resources available to run on many of these combinations before pushing an issue for integration as they are time-consuming to both set up and to run.
There are many Continuous Integration tools available to developers, and Travis-CI is just one of those available freely to the Open Source community.
Since version 3.0, Moodle includes a Travis configuration file in its repository. This configuration file configures and controls a Travis build across a matrix of testing environments. This allows developers pushing patches to Moodle to have their code unit tested before it reaches integration. The hope is that the availability of this integration should reduce the number of unit test failures seen during Integration.
Note: Moodle HQ uses the Jenkins CI platform internally and this should be seen as the canonical CI server for Moodle. The Travis integration provided is to provide early warning to developers of any issues with their code.
Usage
Travis-CI is freely available and is usually configured to run automatically when pushing code, but it must be configured before first use.
For the purpose of this documentation, it is assumed that you are pushing to a public Moodle repository on GitHub. Other integrations are supported, but the free service available from Travis is only available to public repositories.
Setup
- Sign in to Travis CI using your GitHub account
- Once you’re signed in, and the initial synchronisation of your GitHub repositories has completed, go to your profile page
- Enable Travis CI for your clone of the Moodle repository
- Click on the cog icon to configure the Integration
- Ensure that "Build only if .travis.yml is present" is enabled
How do I start a build?
It won't build immediately after setup. Builds start automatically when you push a change.
Moodle plugins
See Adding Travis CI support into your plugin forum discussion.
See also
- Talk:Travis Integration for previous Travis dev docs