Episode 5: TYPO3 core testing infrastructure – Part 1

GitLab CI for the TYPO3 Core Test Suite

Introduction

The TYPO3 core has quite a history of system testing: A powerful and excessive test strategy has been developed over the years to verify stability and integrity at any given point in time.
Continuous integration is an invaluable helper for developers to create side-effect-free solutions, especially in critical and complex areas like the DataHandler where a broken patch could easily commit hazard to database structures. Lots of development time goes into related tests and they are a base allowing flawless refactorings of those structures in the first place.
All these testing efforts have a downside, though: They require continued maintenance and need quite a bit of infrastructure to not lead to frustration or slow down development. We find ourselves fiddling with test related details frequently. Test code and its infrastructure is a part of the project, it requires time to be kept up and running, just like all other parts of the core.
With this attitude in mind, this blog series is about a bigger chunk we tackled lately: The CI testing infrastructure based on bamboo didn’t age perfectly well and was recently superseded by a GitLab based setup. This comes with many advantages and a setup that is a generation younger. We’ll go into various DevOps details with this blog series and hope it is an interesting read for anyone looking into a decent (TYPO3 related) CI setup for agencies or projects.

Management summary

This blog is about technical insights and we’ll go into technical details. The overall picture can be interesting on a management level, though. Let’s sort that out first:

Motivation

So we’ve put a couple of developer weeks into migrating away from the existing bamboo CI setup towards a GitLab based setup. bamboo served us well for about four years and it was the first setup that provided TYPO3 core with ‘pre-merge testing’: All major parts of the test suite are executed before a patch is merged. This allowed us to make sure no code is merged that makes our test suite “red”.
However, bamboo also showed some drawbacks:

Alternatives

As always, there are alternatives. Let’s have a rough look and some of them:

Why GitLab?

So GitLab is a huge project with code hosting, issue tracker and a CI/CD integration. Even though we don’t need all of that for core testing, there are plenty of advantages left:

Summary

We created a full new TYPO3 core testing setup based on GitLab CI since the existing bamboo setup aged and showed limits. We had a look at some alternatives and came to the conclusion our needs are best solved re-creating the setup from scratch. It should be a solid solution for the next few years. Some parts could be re-used by agencies.

We’ll start a deep dive into DevOps details with the next part of the series.

More Articles by Christian “Lolli” Kuhn