Continuous integration/Entry points

Testing JavaScript
We are using  as an entry point. If your project has JavaScript files, it should at least have a  file and define a "test" script.

Example:

If your project needs more complex building processes, the convention is to use Grunt as task runner. For example:

Good example: Further reading:
 * jquery-client: package.json (jshint, jscs, karma; no Grunt needed)
 * CSSJanus: package.json / Gruntfile.js (jshint, jscs, custom test)
 * TemplateData: package.json / Gruntfile.js (jshint, jscs, banana-checker for mediawiki i18n)
 * package.json format on docs.npmjs.org
 * package "scripts" lifecycle on docs.npmjs.org

JavaScript documentation
See JSDuck.

The "predoc" and "postdoc" script hooks in package.json can be used to run additional scripts (eg. build files for inclusion in the documentation, or copy additional files for publication).

Testing PHP
We are using  as an entry point. If your project has PHP files it should list the test framework packages it needs in  under "require-dev" and list the commands to be run in the   property:

See for a good example.

Note that MediaWiki extensions are not standalone projects and cannot run their own PHPUnit test suite from composer, those repositories have a separate  job. PHPCS and PHP lint are still run via composer.json and.

When running the suite under Jenkins, we might want to capture the test results to publish them on the build page. Since your test entry point has multiple commands, the extra arguments are set by Jenkins and should be included in each script command. By convention, the environment variable holding these arguments is all upper case, with the command line name suffixed with :

The Jenkins job can then set these environment variables to inject additional arguments when invoking  for e.g. Checkstyle or JUnit report.

PHP Documentation
See: Doxygen.

Create a  in the project root.

Testing Python
See Continuous integration/Tutorials/Test your python.

Ruby
Use bundler to define your commands.