imfx77 / kanboard-plugin-Wysiwyg-MD-Editor

Integrates external MD editors into Kanboard in order to conveniently edit and preview the markdown textareas, as well as render the markdown fields in the Kanboard interface. Each editor may allow for different customizations of functionality, MD features, and UI themes. Rendering can parametrize theme, code highlight, and background transparency.
MIT License
3 stars 1 forks source link

init unit tests #3

Closed lastlink closed 3 months ago

lastlink commented 3 months ago

@imfx77

imfx77 commented 3 months ago

@lastlink I haven't played yet with automating unit tests via GitHub actions. So I am not really aware what the code you propose is doing and how to handle the errors that were triggered by it. Some assistance would be appreciated.

lastlink commented 3 months ago

@imfx77 I'd remove approval from the github action workflows unless they are using secrets or limited cost. I usually only lock down for deploy actions. Nice thing about unit tests is that you can block prs if the tests fail giving higher confidence of stuff not breaking before you manually test.

To test kanboard you need to clone their whole project, then clone your plugin into the plugin folder, have php installed, run composer install and run the unit test arguments for the database target. In github action it uses the kanboard container that has this embedded to some extend

lastlink commented 3 months ago

@imfx77 I follow a dev branch policy where all prs get merged into dev and I can then test that manually before merging into master and doing a release. Helps with open contribution and seeing all changes at once. You do need to make dev your main branch if you do this, so contributors auto do prs from dev. But it's preference and how active you are in maintaining the repo.

lastlink commented 3 months ago

@imfx77 after merging this branch in then require the unit tests (probably leave required approvals unchecked) then any new prs won't be able to be merged in if unit tests are failing

github_status_checks
imfx77 commented 3 months ago

making a dev branch, will try to configure sensible protection rules to allow for contribution

lastlink commented 3 months ago

@imfx77 I've updated target to dev. Anything holding back this pr getting merged in?

imfx77 commented 3 months ago

should i remove this check to allow automatic merge? image

lastlink commented 3 months ago

@imfx77 after merging this branch in then require the unit tests (probably leave required approvals unchecked) then any new prs won't be able to be merged in if unit tests are failing github_status_checks

I made a comment here to leave it unchecked. I might recommend leaving it on in master so you approve anything for final release. You do have to override merge when you merge your own prs. So there are pros and cons. Maybe it's best to have unchecked. I think only maintainers can click auto merge anyways.