Laboratoire-de-Chemoinformatique / moodle-tiny_molstructure

0 stars 0 forks source link

consider adding github actions support - it's free and very useful. #5

Open danmarsden opened 3 months ago

danmarsden commented 3 months ago

Some of the tests run by the Moodle.org plugins db can be run via github actions on each commit in your github repo. Enabling this helps you to make sure future changes to your plugin will continue to follow the guidelines.

It will also trigger your behat tests on every commit to help make sure you haven't broken something.

the short version - grab this file: https://github.com/moodlehq/moodle-plugin-ci/blob/master/gha.dist.yml rename it as ci.yml and put into the directory .github/workflows within tyour project eg: https://github.com/danmarsden/moodle-mod_attendance/blob/MOODLE_311_STABLE/.github/workflows/ci.yml

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

cperves commented 3 months ago

As a matter of fact I launch unit and functional test in the gitlab CI of my University repository, the format is a little different from github
But I'm going to see that for github as soon as possible since it will be strong gain for my plugins

danmarsden commented 3 months ago

If you want to, feel free to use the Catalyst re-usable workflows version - it allows much simpler github action templates - just requires you to have the supported versions tag in your version.php: https://moodledev.io/docs/apis/commonfiles/version.php#supported-versions

then you can have a really simple workflow like the one defined here: https://github.com/danmarsden/moodle-mod_attendance/blob/MOODLE_403_STABLE/.github/workflows/ci.yml

more documentation on our re-usable workflow templates are here: https://github.com/catalyst/catalyst-moodle-workflows?tab=readme-ov-file#reusable-workflows

cperves commented 3 months ago

added on devel, need to filter matrix and put it on other branch with conditions