Mirroring CI locally and migrations testing — A suggestion
by Christian Wolf
Running tests in a CI pipeline is for productive apps a valuable measurement to prevent bugs and issues. When the testing takes long, this is however a burden to the developer’s time schedule.
In the Cookbook app, I created a set of scripts that allow me to run the tests in some docker environment. This environment is used in the CI pipeline, but I can run it locally as well. That way, the cycle time reduces from dozens of minutes to only seconds until I see a test failing or succeeding. One of the main points of this setup was to simulate all migrations as part of the CI pipeline because these caused issues on the users’ instances on a regular level. A quick hotfix and some stress for the developer was the end result.
The approach has however some drawbacks (e.g. the CI get slower than required, complexity, maintenance, …). I want to show the rough idea and invite people to step up and discuss the approach suggested here.
—
See more ⚡ lightning talks from the Nextcloud Community Conference 2024:
#Nextcloud #NextcloudConf2024 #LightningTalk