Skip to content
Ruslan Kabalin edited this page Apr 30, 2019 · 4 revisions

Testing locally

You can run moodle-plugin-ci on your Moodle repo to test changes you made. In order to do that, you need:

  1. Tag your changes with version higher than currently deployed upstream. It is suggested to use 4 digits version, e.g if upstream one is 2.5.0, tag yours as 2.5.0.1.

  2. Cherry pick https://github.com/moodlesp/moodle-plugin-ci/commit/24c7de946245d596fc8858d9d0b3a7a41c8c1b8e, change the version to match your tag, and change path to match your moodle-plugin-ci clone location.

  3. Go to Moodle repo and run (specify the right path to file you added at step 2):

$ php composer.phar create-project --repository-url=/home/ruslan/git/moodle-plugin-ci/packages.json blackboard-open-source/moodle-plugin-ci

This should create moodle-plugin-ci directory in your Moodle root folder.

  1. To run the test, use:
$ moodle-plugin-ci/bin/moodle-plugin-ci eslint --max-warnings=0  admin/tool/certificate/

Notice that at step 3 a copy of moodle-plugin-ci is created in your Moodle, so if you are working on moodle-plugin-ci development, you should either make changes in this directory (can copy them to your moodle-plugin-ci repo) or replace it with symlink to moodle-plugin-ci repo.

Once finished, just delete moodle-plugin-ci.

Deploying on moodlesp repo

  1. Submit your changes in PR to https://github.com/moodlesp/moodle-plugin-ci
  2. Once merged, you need to tag changes on master, so that plugins which are using our repo would pick those changes. It is suggested to use 4 digits version, e.g if upstream one is 2.5.0, tag yours as 2.5.0.1. This will allow not to clash versioning with upstream master and switch to higher version when there is a new release.

Upstream submission

Before submitting upstream make sure you run make test, this may fix style issues in the code if you have them and highlight other problems.

Clone this wiki locally