Skip to content

Make CI more efficient #10704

@cbrnr

Description

@cbrnr

Over the years, our CI jobs have grown in both number and run time. While high test coverage is essential, I have the feeling that many of our tests could be optimized in the sense that currently we're doing a lot of inefficient extra work. I haven't looked at concrete examples yet, but the usual practice is to add new tests for new features or bug fixes, often without thinking if the new behavior could be more efficiently checked by modifying an existing test.

Many of our jobs run for almost an hour, which means developers have to wait at least that long before merging. In addition, every subsequent push triggers the whole CI pipeline again. This also means that we're consuming a significant amount of power, which in times of the climate crisis is something we should try to avoid.

Could we use this issue report to discuss (1) if we agree that we should try to minimize CI run time, and (2) if so, collect ideas how we could achieve this?

Some things that come to mind immediately:

  1. Cancel all running jobs if another push is made to a PR (not sure if this is already the case, or if running jobs keep running until they are done).
  2. Determine on a very high level if we have redundant jobs. I currently do not have a good knowledge of why we need all these jobs on different platforms (Azure, CircleCI, GitHub Actions, ...), but we should make sure that we're not running any duplicate tests.
  3. Not sure how much influence downloading and installing mne and all its dependencies on CI has, but I assume we are already caching this? Same for downloading our testing data, if we don't have to do it every time we set up a new test run this would save a lot of time.
  4. Maybe we could have people start with draft PRs that do not trigger CI? Or just a reduced subset such as style and/or only the tests that are directly affected by the changes?

IMO the long-term goal should be a thorough inspection of our test suite to optimize, merge, remove, and change tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions