-
Notifications
You must be signed in to change notification settings - Fork 598
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
github: unit-tests: split unit tests to code specific workflows #15065
github: unit-tests: split unit tests to code specific workflows #15065
Conversation
Fri Feb 14 16:07:13 UTC 2025 Spread tests skipped |
37a30aa
to
76d38f7
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15065 +/- ##
==========================================
- Coverage 78.07% 78.06% -0.01%
==========================================
Files 1182 1179 -3
Lines 157743 157702 -41
==========================================
- Hits 123154 123114 -40
+ Misses 26943 26940 -3
- Partials 7646 7648 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
.github/workflows/test.yaml
Outdated
- { code: go, go-build-tags: faultinject, skip-coverage: false, snapd-debug: false, go-test-race: false} | ||
- { code: go, go-build-tags: statelocktrace, skip-coverage: true, snapd-debug: false, go-test-race: false} | ||
- { code: go, go-build-tags: snapdusergo, skip-coverage: false, snapd-debug: false, go-test-race: false} | ||
- { code: go, go-build-tags: "", skip-coverage: true, snapd-debug: false, go-test-race: true } |
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 don't think you need to add the code: go
to the matrix data. You already pass it in statically above in the "with" section
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.
oops, thanks for catching that. It's a leftover from before I moved C unit tests to a separate job.
.github/workflows/unit-tests.yaml
Outdated
description: 'Code to test (c, go)' | ||
required: true | ||
type: string | ||
default: '' |
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 don't know that default is relevant here since the code
input is required
76d38f7
to
4cc9720
Compare
.github/workflows/test.yaml
Outdated
matrix: | ||
test-case: | ||
- { code: c, c-compiler: gcc } | ||
- { code: c, c-compiler: clang } |
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 don't think you need the code: c
here either. You already set it statically in the "with" section
4cc9720
to
4ada18a
Compare
.github/workflows/unit-tests.yaml
Outdated
description: 'Code to test (c, go)' | ||
required: true | ||
type: string | ||
default: 'go' |
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.
Unless I'm mistaken, I believe that when you mark an input as required, the workflow will throw an error if that input isn't present. If the default value will never be used, why have it? I would get rid of the default: 'go'
line just to not add in irrelevant code.
6bd175f
to
b6d8b0e
Compare
b6d8b0e
to
3e3a751
Compare
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.
Thanks, a suggestion for shorter less repetitive name concats
Signed-off-by: Maciej Borzecki <[email protected]>
Split unit-tests to Go and C specific workflows. Signed-off-by: Maciej Borzecki <[email protected]>
a46c3d9
to
7acc424
Compare
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.
Thanks!
Split unit-tests to Go and C specific workflows.
Thanks for helping us make a better snapd!
Have you signed the license agreement and read the contribution guide?