-
Notifications
You must be signed in to change notification settings - Fork 489
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
ci: test-unit job matrix for win/macos/ubuntu #2206
Conversation
Some tests look to fail on windows runner: https://github.com/docker/buildx/actions/runs/7640538748/job/20815891223#step:5:419 |
61852c8
to
173a44d
Compare
5137a6c
to
947498a
Compare
This one is interesting when running tests on macOS runner when temp dir is the default one: https://github.com/docker/buildx/actions/runs/7652363539/job/20851977017?pr=2206#step:6:863
Note the diff with
|
f3c264e
to
b04b304
Compare
Signed-off-by: CrazyMax <[email protected]>
// getLongPathName converts Windows short pathnames to full pathnames. | ||
// For example C:\Users\ADMIN~1 --> C:\Users\Administrator. | ||
func getLongPathName(path string) (string, error) { | ||
// See https://groups.google.com/forum/#!topic/golang-dev/1tufzkruoTg | ||
p, err := windows.UTF16FromString(path) | ||
if err != nil { | ||
return "", err | ||
} | ||
b := p // GetLongPathName says we can reuse buffer | ||
n, err := windows.GetLongPathName(&p[0], &b[0], uint32(len(b))) | ||
if err != nil { | ||
return "", err | ||
} | ||
if n > uint32(len(b)) { | ||
b = make([]uint16, n) | ||
_, err = windows.GetLongPathName(&p[0], &b[0], uint32(len(b))) | ||
if err != nil { | ||
return "", err | ||
} | ||
} | ||
return windows.UTF16ToString(b), nil | ||
} |
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.
Logic is the same as moby one https://github.com/moby/moby/blob/e8346c53d93d2cddf3d09910e166cdd8874070b3/integration-cli/utils_windows_test.go#L5-L27
expected := "C:\\Users\\foobar" | ||
if isGitBash() { | ||
expected = "C:/Users/foobar" | ||
} |
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.
As we are using Git bash on ci to run tests, the behavior is not the same.
Signed-off-by: CrazyMax <[email protected]>
Signed-off-by: CrazyMax <[email protected]>
Second commit is a bug on Windows. Let me know if you want this in a dedicated PR. Should be backported as well. |
@@ -0,0 +1,26 @@ | |||
package build |
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.
Not sure if we should put this in this package or util one. Maybe on buildkit as it might be useful for Windows support (cc @TBBle @gabriel-samfira)
include: | ||
- pkg: ./... | ||
skip-integration-tests: 1 |
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.
@jedevc I removed this one as it's already handled in test-unit
job through ubuntu-latest
otherwise we have dup testing. Let me know if that sounds good.
- | ||
name: Send to Codecov | ||
if: always() | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
directory: ./bin/testreports | ||
flags: integration |
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.
Added some flags for codecov so we have a clear distinction between unit and integration tests
Needs follow-up for client-side integration tests on windows/macos |
follow-up #2205 (comment)