-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Prune Comment System Tests for Faster CI #9752
Conversation
Codecov Report
@@ Coverage Diff @@
## main #9752 +/- ##
==========================================
+ Coverage 82.13% 82.26% +0.12%
==========================================
Files 98 98
Lines 5968 5966 -2
==========================================
+ Hits 4902 4908 +6
+ Misses 1066 1058 -8
|
Down to 12 minutes in this PR, compared to 24 in the other one I have open. |
This is pretty neat @noi5e...my question is about
In my opinion, those tests should not be commented out. In the event they fail, it would signal to us that the bug has re-occured. It is better for us to find out from the tests first than the user...let me know your thoughts... |
Hi, this is a great conversation and an impressive speed-up! Just so we know all the possibilities, is it at all possible to parallelize these tests, for example to run some of the system tests concurrently? Either by splitting up the tests into 2 suites, or by using some switch to run half the tests in one job and half in another? I totally hear @RuthNjeri's input on keeping them online, i just wonder if we can have both? |
@RuthNjeri and @jywarren thanks for the reviews and thoughts. I definitely see the importance of keeping the tests just in case they pop up again in the future. @jywarren Do you have any links for documentation on how to run these tests in parallel? Is it something like what's described here? Or would it be something that's done in Capybara (or whatever our testing suite is exactly, still not sure 😅) |
Yes exactly, in different jobs most likely in GitHub actions. This is relatively low priority though, and I worry that you're taking on more than your scope, so please only take this on if it brings you joy! |
What if we used this PR to try moving the commented-out tests into a separate job? Does it work to simply make a folder and file called Then we could run it with a copy of the system tests job, changing only this last line: plots2/.github/workflows/tests.yml Line 130 in cf6f681
to:
|
99a1496
to
a0aabec
Compare
I'll try experimenting with this during this week. Just |
Just a note that due to our codecov thresholds config, we'll have to change Lines 6 to 30 in a65efa6
Looks good though @noi5e !! |
Just pushed a commit increasing |
I changed the My guess is that for whatever reason Rails needs extra instruction in order to run tests in a custom directory (that's not |
Hm, i think the "unexpected end" was from a mistaken extra "end" on line 480, maybe? I tried removing it and was able to run |
🎉 🎉 🎉 |
Cool but whoa -- vs in #9958 -- Should we re-trigger them to try to get better times? |
Re-running to see... |
Running again. Could it have to do with time of day or something? Or a GitHub Actions slowdown? The integration tests themselves really did clock 1390 seconds or 23 minutes. |
Hmm. It's pretty consistent. What do you think is going on here? |
OK - speed issues seem to be across the board. Here's an unrelated recent PR: #9965 Huh, yes, they're all this way: https://github.com/publiclab/plots2/actions/runs/1072626662 |
This, 9 days ago affected integration tests for the first time in a few months: https://github.com/publiclab/plots2/pull/9878/files |
But it was only a whitespace change, actually. So it could be a change to our actual application code that has caused integration tests to slow significantly. |
This, 2 days ago, ran fast: https://github.com/publiclab/plots2/actions/runs/1071468860 Hmm. |
OK, the change was between:
So it was likely the change to - additional_paths: []
+ additional_paths: ['public/lib'] Since we found that this didn't actually solve the problem, and merged #9918 instead, let's just revert #9959 for now to speed things back up. |
Now watching #9966 for faster load times. Let's merge that and then rebase this on top of it to get a final speed check (assuming this works). |
0744002
to
d38986b
Compare
d38986b
to
2001d46
Compare
Now rebasing over #9966 having just merged it. Fingers X and we should be able to merge this then! |
Code Climate has analyzed commit 2001d46 and detected 0 issues on this pull request. View more on Code Climate. |
Let's also update the branch protection rules to include this additional set "comment-system-tests" once we merge this! |
Nice! Thanks for the assist on this @jywarren |
* prune comment system tests publiclab#9069 * break comment system tests out to separate workflow publiclab#9069 * increase after_n_builds by 1 publiclab#9069 * change rails test command publiclab#9069 * removed extra "end" Co-authored-by: jywarren <jeff@unterbahn.com>
* prune comment system tests publiclab#9069 * break comment system tests out to separate workflow publiclab#9069 * increase after_n_builds by 1 publiclab#9069 * change rails test command publiclab#9069 * removed extra "end" Co-authored-by: jywarren <jeff@unterbahn.com>
This should have happened a long time ago...
This is all up for debate, but I'm pruning the comment system tests so that System Test CI doesn't take 20 minutes. Locally, when I run this PR, the comment system tests take 4 minutes. Big improvement!
I know the structure of
comment_test.rb
is confusing, so I'll break it down here. The system tests are divided into 3 parts:This PR does the following:
(This issue is part of the larger Comment Editor Overhaul Project with Outreachy. Refer to Planning Issue #9069 for more context)