-
Notifications
You must be signed in to change notification settings - Fork 1
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
Split tests into groups + SafeTestsets #30
Conversation
Nice, I really like the idea of basing the groups off of the folder structure! |
Does this also work with the environment variable? Or did you decide not to go that route? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
- Coverage 85.54% 6.02% -79.52%
==========================================
Files 1 1
Lines 83 83
==========================================
- Hits 71 5 -66
- Misses 12 78 +66
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
end, | ||
) | ||
|
||
@time begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't @testset
report times now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e. could we achieve this by wrapping all of this in @testset
or @safetestset
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure, I mostly copied this from my other workflows. I think the main difference is that @time
also reports splits in compiletime/runtime, which I find interesting, but I have absolutely no preference about this.
Just as an aside, wrapping things in nested @testset
structures makes it such that output is only printed after all tests finish. Not a big deal, but something to keep in mind.
This works both with environment variables and test args, it first checks the latter, if this is empty it checks the environment variable, if that is empty it runs all tests |
(TODO: codecov token) |
I think the conclusions from our discussion were:
|
If the tests pass, I would merge this and I'll add the setup folder/files in a separate PR. |
Thanks! |
This PR reorganizes the test structure as described in #28 .
The grouping logic happens automatically based on file structure:
test/mytest1.jl
test/mytest2.jl
test/utility/test1.jl
test/basics/test2.jl
examples/myexample.jl
To select/run a subset of the tests, the
Tests.yml
CI can make use of thegroup
input. Selecting this in amatrix
ensures parallelism through the github runners.To select/run a subset of the tests locally, the
test_args
keyword, along with the--group=groupname
syntax can be used, for example:Note that all group name matches are insensitive to capitalization. The default group
ALL
runs all tests.