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   script.

You will need the,  , and   files in your project. Look at one of the projects listed in the example section below for an example of these files.

Grunt task runner
If your project has complex build processes or is an extension that will benefit from i18n checking and JSON file linting, the convention is to use Grunt as a task runner. Your project still has a package.json file, which has a dependency on. In turn, a Gruntfile.js file implements.

JavaScript documentation
Use  as the entry point. The convention is to use JSDuck. The  and   script hooks in   can be used to run any additional scripts (e.g. build files for inclusion beforehand, or copy additional files for publication afterward).

Examples
Basic setup:

Advanced setup using Grunt:

Example projects:
 * 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)

Further reading:
 * package.json format on docs.npmjs.org
 * package "scripts" lifecycle on docs.npmjs.org

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   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  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. a 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.

T104024 discusses an entry point.