Integrate Redmine with GitLab (or other free CI system for open source) to run tests
On my local development box, I've a lot of branches with my entire work for Redmine. These branches contain features or bug fixes in a stable phase that are already posted on Redmine.org or my work in progress for future features or bug fixes that are not public yet.
Most of the time, before posting a patch on Redmine.org, I'm running the entire test suite just to be sure that I do not break any existing test. If the tests pass, I'm uploading the patch/patches. I assume that when reviews a patch uploaded by me, Go Maeda runs the tests on his local environment (from the same reason). So there are at least 2 times in this happy scenario. If the patch needs some changes after the initial review, we run the tests more than 2 times in total. The same situation when I need to check the patch against master and other stable branch (for ex: 3.4-stable).
Other case is when some commits were been made on the trunk and the patches that I've posted need to be rechecked against the new trunk in order to be sure that they still apply cleanly and the tests pass. Here is the most consuming time for me because I need to run the tests on my local environment for each patch/branch.
I'm saying time consuming because even if the total time to run the tests is ~6 minutes, in that time my local development is blocked (I cannot touch the code). And if I need to do the same operation 5 times => 40 minutes while I cannot touch Redmine development box.
What it will be very useful for me is to integrate Redmine with an open source CI service (GitLab or Travis) in order to delegate all these tests there. I think that it will be useful also for other contributors. I'm not saying that I want to change the current workflow, I just want to have the possibility to run the tests there and if everything is ok, to upload the patch here as we currently do.I made a branch on GitLab to prove this integration, it can be found here:
- https://gitlab.com/marius-balteanu/redmine/blob/feature/gitlab_integration/.gitlab-ci.yml which is the gitlab file that enables the integrations
- https://gitlab.com/marius-balteanu/redmine/pipelines: test results for each commit.
The code is automatically fetch by GitLab from the GitHub repository and because I'm member and the owner of the repo, I can push additional branches on the repository. If the file is committed to Redmine, I won't have to add the file each time when I'm pushing branch that I make and also, I won't need to pay attention to exclude the file from the patch before uploading it to Redmine.org.
I chose GitLab because I'm using it at work and have some integrations/features that we can benefit from in the future. Also, I'm very ok with any other service.
#2 Updated by Pavel Rosický 8 months ago
Yes, it's very time consuming to contribute and also for maintainers to verify existing patches.
If you don't want to move to git which was discussed and rejected many times, please at least enable travis on
or make a GitLab account and allow to post patches for contributors.
it's an easy change that will save time to everyone.
#6 Updated by Marius BALTEANU about 1 month ago
Pavel Rosický wrote:
are you about to open it for constributors? in such case all stable branches should be marked as protected.
for me it would be much easier. I'll instantly know about potential conflicts or if tests are green without even setting a local enviroment...
I'm open only to accept new branches to be pushed in order to have the tests run in GitLab CI. Any merge to stable branches it is useless.
#7 Updated by Marius BALTEANU about 1 month ago
Go Maeda, I'm planning to add Postegres as well and after that, it's there any chance to have this file committed? Right now I'm cherry picking a commit for every branch that I want to run tests and it's annoying. Or do you prefer to have Jean-Philippe feedback on this?