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

[Testing:Developer] Manual parallelizing in Github Actions #9737

Merged
merged 22 commits into from
Sep 10, 2023
Merged

Conversation

IDzyre
Copy link
Contributor

@IDzyre IDzyre commented Aug 29, 2023

Please check if the PR fulfills these requirements:

  • Tests for the changes have been added/updated (if possible)
  • Documentation has been updated/added if relevant
  • Screenshots are attached to Github PR if visual/UI changes were made

What is the current behavior?

Currently, Cypress Cloud parallelizes the runs, however this only works for Submitty members, not external contributors. It also has a limit of 100,000 different test runs (Specific It('should test...', ()=>{}); runs, not spec files or describe instances). With increasing development, and the creation of new spec files that add to the tests, this will most likely not be enought.

What is the new behavior?

The runs are now split up into five different categories manually, and Cypress Cloud has been removed from CI:

  • Admin -- Testing admin features, or website options
  • Feature -- Testing user features, polls, forums, late day caching, etc.
  • Gradeable -- Testing creation, editing, submission of gradeables
  • System -- Testing things that need other system functions to run, and accessibility testing.
  • UI -- Testing misc user interfaces

@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Merging #9737 (3124099) into main (ae74ecc) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #9737   +/-   ##
=========================================
  Coverage     23.25%   23.25%           
  Complexity     8232     8232           
=========================================
  Files           227      227           
  Lines         29362    29362           
  Branches         73       73           
=========================================
  Hits           6828     6828           
  Misses        22464    22464           
  Partials         70       70           
Flag Coverage Δ
autograder 22.15% <ø> (ø)
js 27.51% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.15% <ø> (ø)
python_submitty_utils 71.65% <ø> (ø)
submitty_daemon_jobs 91.01% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@IDzyre IDzyre marked this pull request as ready for review September 1, 2023 21:49
Copy link
Member

@jason490 jason490 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can try using the github matrix to get rid of doing similar operations
ex:

Cypress-Test:
    ...
   strategy:
      matrix:
           containers: ["gradeable","admin","UI",etc...]
   ...
      ...
           spec: cypress/e2e/${{matrix.containers}}/*

Copy link
Member

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem reasonable to me. I do worry about needing to rebalance the sets of tests occasionally, but that's certainly manageable, and better than the alternative of just running all of the tests sequentially.

Is there any parallelization you can do in one or more of the test sets? We'd have to make sure none of the tests potentially interfere with one another and the benefits of parallelization would be hampered by the limited resources available on the CI runners, but it may reduce the time slightly at least.

.github/workflows/submitty_ci.yml Show resolved Hide resolved
@IDzyre
Copy link
Contributor Author

IDzyre commented Sep 8, 2023

Changes seem reasonable to me. I do worry about needing to rebalance the sets of tests occasionally, but that's certainly manageable, and better than the alternative of just running all of the tests sequentially.

Is there any parallelization you can do in one or more of the test sets? We'd have to make sure none of the tests potentially interfere with one another and the benefits of parallelization would be hampered by the limited resources available on the CI runners, but it may reduce the time slightly at least.

I think its probably possible, but to make the CI run more smoothly as it is, I think that can be a future PR.

Copy link
Member

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on this!

@bmcutler bmcutler merged commit e540a64 into main Sep 10, 2023
19 checks passed
@bmcutler bmcutler deleted the splitGHA branch September 10, 2023 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants