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

[RFC] Move to a more modular structure for tests in code and CI #13882

Open
JCQuintas opened this issue Jul 18, 2024 · 4 comments
Open

[RFC] Move to a more modular structure for tests in code and CI #13882

JCQuintas opened this issue Jul 18, 2024 · 4 comments
Assignees
Labels
MUI X RFC Request For Comments scope: code-infra Specific to the core-infra product

Comments

@JCQuintas
Copy link
Member

JCQuintas commented Jul 18, 2024

What's the problem?

As teams, features and tests grow, the tests and CI workflows will keep getting slower.
Our current unit tests take 18 minutes to complete.

But our teams are mostly independent from each other, changes in Pickers don't affect Charts.
Which means we can divide possibly long running tasks into smaller ones, more focused on the components that did change in the PRs.

This would also allow us to divide the tests and configurations in our current test folder into more specialised ones. Only catering for the needs of a single library or goal. Eg: Charts tests don't need Date manipulation, but might require SVG-DOM support. Or a playwright test doesn't need any dependency from mocha, since it can run all tests by itself.

What are the requirements?

  • Faster start-to-finish pipelines
    • Pipelines should only runs on PRs that change their related component or global libs.
      • Changes to packages/x-grid* run pipelines related to x-grid
      • Changes to docs/package.json run pipelines related to docs
      • Changes to package.json run all pipelines
  • Standalone test packages/projects/folders for each team/library or goal.
    • Eg: team/lib: grid/treeview/etc, goal: performance/unit/etc
    • We can have folders named e2e-grid, unit-pickers, performance-charts, etc.

What are our options?

An option would be to try to divide and parallelise the current unit tests by filtering the folders. But it wouldn't solve folder structure and organisation.

Proposed solution

Resources and benchmarks

No response

Search keywords:

@JCQuintas JCQuintas added status: waiting for maintainer These issues haven't been looked at yet by a maintainer RFC Request For Comments scope: code-infra Specific to the core-infra product MUI X labels Jul 18, 2024
@JCQuintas JCQuintas self-assigned this Jul 18, 2024
@JCQuintas
Copy link
Member Author

related #13718

@Janpot
Copy link
Member

Janpot commented Jul 18, 2024

Create folder-aware workflows for the new structure.

IMO the CI is not the right place to solve this problem. It will require us to manually micromanage a parallel dependency structure that mimics our already existing packages dependency graph. We recently started more and more relying on nx as a task runner. Have you already looked into their affected code feature?

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 22, 2024
@michelengelen
Copy link
Member

Shouldn't this be a shaping page instead?

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 24, 2024

Related to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MUI X RFC Request For Comments scope: code-infra Specific to the core-infra product
Projects
None yet
Development

No branches or pull requests

4 participants