Don't make other tests depend on PHPUnit

Created on 16 September 2023, about 1 year ago
Updated 22 September 2023, about 1 year ago

Problem/Motivation

When we moved lint jobs to the parent, unit tests became a blocking step between linting and the rest of the tests. This means a pipeline looks like the following:

composer + yarn -> lint -> composer + yarn -> unit tests -> other tests.

We use several runners for the 'lint' step and several runners for the 'other tests' step, but only two runners for composer + yarn and only one runner for phpunit.

According to @nnewton there is a 20 minute lease on runners, so if there aren't other jobs outside a pipeline for them to pick up, they'll be sitting idle for about 2-4 minutes while phpunit runs.

Since unit test failures isn't the common case (i.e. they usually pass), we should remove -with-unit-tests from the other tests, and just make everything depend on lint (which it defacto does due to the parent/child split). phpcs and phpstan increasingly catch the sort of silly mistakes that would also cause phpunit test failures.

This way there's a shorter gap between linting and other steps, meaning the runners don't sit there doing nothing inbetween.

If we want to block tests on unit tests again, we should consider duplicating them into the main job too, so that they run alongside linting and block there, and then again with the PHP version, however the amount of boilerplate YAML to get run-tests to work in that step is significant.

This should result in 2-4 minute quicker overall test runs.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Fixed

Version

10.1

Component
PHPUnit 

Last updated about 9 hours ago

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024