Copyleaks / moodle-plagiarism_copyleaks

Copyleaks Plagiarism plugin for Moodle
GNU General Public License v3.0
3 stars 3 forks source link

consider adding github action support #9

Open danmarsden opened 3 years ago

danmarsden commented 3 years 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.

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.

CL-BayanAbuawad commented 3 years ago

@danmarsden for some reason this is failing for all of the tests

even here on the link that you referenced you can see that it is failing.

but I can tell on Moodle that it is passing: image

danmarsden commented 3 years ago

I haven't looked at the version in the plugins db, but there are 3 types of failures in your github action runs if you look at the individual actions being run: codechecker (which you can run locally yourself using the local_codechecker plugin) : https://moodle.org/plugins/local_codechecker (and usually gives the same result as the plugins db)

PHPDoc issues - which you can run locally yourself using the local_moodlecheck plugin: https://moodle.org/plugins/local_moodlecheck

and the phpunit test issues - I see you've copied my attendance workflow rather than the upstream one - in my repo I add some extra lines to run the core phpunit privacy tests, which will only run if you have phpunit tests in the plugin itself as well, as you don't it's probably better to remove them.

You do occasionally see new coding guidelines come through and so code that previously was passing is now failing, but usually there aren't too many things to fix... It's also not requirement for approval in the plugins db, but does help you maintain the code.