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

Reduce Cypress Mock Test Execution Time #3579

Merged
merged 169 commits into from
Jan 15, 2025

Conversation

antowaddle
Copy link
Contributor

@antowaddle antowaddle commented Dec 16, 2024

Description

image

Job Separation:

  • The new workflow separates tasks into distinct jobs: Setup, Lint, Unit-Tests, Get-Test-Groups, Cypress-Mock-Tests, and Combine-Results-and-Upload.
  • This separation allows for better parallelization and clearer organization of tasks.
  • Significantly, there is a time execution reduction of ~30-35 mins for the Mock tests to execute, this will increase efficiency and enhance productivity of the team.

Caching Strategy:

  • The new workflow consolidates caching into a single step in the Setup job, caching all node modules at once.

Linting:

  • A dedicated Lint job has been added, improving code quality checks.

Unit Testing:

  • Unit tests now have their own job, with improved handling of coverage reports.
  • The new workflow explicitly copies coverage results to a specific directory and uploads them as an artifact.

Cypress Testing:

  • The new workflow introduces dynamic test group generation with the Get-Test-Groups job.
  • Cypress tests are now run in parallel for different test groups, this greatly redused the execution time by around 80%.

Results Combination:

  • A new Combine-Results-and-Upload job has been added to merge results from unit tests and Cypress tests.

Artifact Handling:

  • The new workflow uploads multiple artifacts at different stages (unit tests, Cypress tests, combined results).

Codecov Integration:

  • The Codecov upload is now part of the Combine-Results-and-Upload job, ensuring it receives the complete test coverage data.

How Has This Been Tested?

I've executed the PR on a number of builds and checked the results accordingly.

How Can This Been Tested?

Pull the code locally, then make a mock commit/push and the Github action will trigger the pipeline.

Test Impact

N/A.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

antowaddle and others added 30 commits November 20, 2024 17:07
increase card timeout and delete active wait
@antowaddle
Copy link
Contributor Author

There is a dependabot suggestion to bump codecov/codecov-action from 4.6.0 to 5.1.2. @antowaddle do you think we should include in this PR? https://github.com/opendatahub-io/odh-dashboard/pull/3608/files

@dpanshug I'd like to keep this change isolated, it's a very large change to the Dashboard pipeline and I want to reduce the blast radius.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@christianvogt
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit ffba59a into opendatahub-io:main Jan 15, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants