Skip to content

Split behat jobs in CI #278

Closed
Closed
@emteknetnz

Description

@emteknetnz

We have some long running behat jobs in CI, most notably elemental which takes over 45 minutes. This slowness means that developers working on pull-requests need to wait a long time for CI to complete, which isn't great.

We should be able to split behat jobs into multi jobs by using @tags on the behat feature files to denote which jobs they should belong to e.g. @job1 and then updating gha-generate-matrix to dynmically detect these tags are create a number of jobs and then on the command line add a --tags @job1 command line option when running behat.

We should look at existing behat jobs and split things if they're over 10 minutes running time. I've used 10 minutes as that's roughly how long the framework-orm phpunit job takes, and that's a large phpunit job.

Acceptance criteria

  • Long running behat CI job are identified
  • Behat CI jobs are split if they're over 10 minutes in running time
  • An exception is thrown from gha-generate-matrix if a feature file with a @job1 style tag is found, and there is another feature file that does not have a job tag. This is done because otherwise this feature file will never be run in CI
  • Job tag are automatically detected by the CI. Behat keeps running normally if there's no job tag detected.

Example run:

https://github.com/emteknetnz/silverstripe-admin/actions/runs/9947426641

image

(note: this test had jobs split 2x, for the actual PR I've split them 3x)

PRs

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions