Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split behat jobs in CI #278

Closed
4 tasks
emteknetnz opened this issue Jun 24, 2024 · 1 comment
Closed
4 tasks

Split behat jobs in CI #278

emteknetnz opened this issue Jun 24, 2024 · 1 comment
Assignees

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Jun 24, 2024

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

@emteknetnz emteknetnz changed the title Split behat tests in CI Split behat jobs in CI Jun 24, 2024
@emteknetnz emteknetnz self-assigned this Jul 15, 2024
@emteknetnz emteknetnz removed their assignment Jul 16, 2024
@GuySartorelli
Copy link
Member

PRs merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants