grabs / moodle-mod_unilabel

1 stars 10 forks source link

consider adding travis ci support #6

Closed danmarsden closed 5 years ago

danmarsden commented 5 years ago

The checks run in the moodle.org plugins db can also be run automatically here on github using the travis-ci integration. You can see the list of current failures reported here: (you may need to be logged in to view this page) https://moodle.org/plugins/pluginversion.php?id=17753

More information on this is here: https://moodle.org/mod/forum/discuss.php?d=323384 Adding Travis support and fixing the reported issues will also address a number of things we would notice during a full review.

Integrating with travis is optional and will not block approval in the plugins db, but it does make the review process a bit easier and usually provides a good way to ensure future compliance with coding guidelines etc.

The link I give above gives the full details, but here's a short step-by-step to show you how easy it is to add.

grab this file: https://github.com/moodlerooms/moodle-plugin-ci/blob/master/.travis.dist.yml rename it as .travis.yml and put in the root of your github directory. Go to: https://travis-ci.org/profile/grabs Flick the switch on the moodlenew-mod_unilabel

then on every commit you make to github it will fire off a request to travis to run the tests in .travis.yml and will give you traffic lights beside each commit and generate a report.

something else you might want to change: in .travis.yml the default file has this line:

env: global:

MOODLE_BRANCH=MOODLE_32_STABLE you might want to add other branches to that list (or remove 32_STABLE because it's not supported.) so you might want to change it something like:

env: global:

MOODLE_BRANCH=MOODLE_34_STABLE MOODLE_BRANCH=MOODLE_35_STABLE

grabs commented 5 years ago

Thank you for the explanation. I added travis ci support and am hoping all is ok.

danmarsden commented 5 years ago

nice - travis becomes even more useful when you add behat or unit tests to your code as it will also run those on all databases/php versions you have configured.

grabs commented 5 years ago

Hi, I will look into it but it will take a while.

danmarsden commented 5 years ago

If you're interested, I'd start by doing something simple - take a look at the mod/choice/tests/behat/add_choice.feature file and see if you can modify that to do something similar for your plugin. Good luck! :-)