-
Notifications
You must be signed in to change notification settings - Fork 33
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: run rust-tests on windows #92
base: main
Are you sure you want to change the base?
Conversation
340f06b
to
13d4ca9
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.
@crrow thanks for the fix! interestingly the CI job wasn't even triggered. any idea what's going on?
@crrow i suspect your previous approach using binstall could work but the github action was not whitelisted by asf so the whole workflow is not triggered. if you can verify that binstall approach in your own fork and get CI to pass, then i can reach out to have that white listed. |
ok, i'll check it out later. |
6300fc3
to
0b991e3
Compare
Hello @xushiyan , I setup the workflow, have a check when you are free. https://github.com/crrow/hudi-rs/actions/runs/10122608881/job/27994952767 |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cargo-bins/cargo-binstall@main | ||
- name: Install tarpaulin | ||
run: cargo binstall -y cargo-tarpaulin |
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.
@crrow using cargo-bins/cargo-binstall
works! The job fails due to some test failure - can you look into and fix any code if needed? meanwhile i'll get binstall whitelist so it can be triggered here.
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.
@xushiyan I'd love to, but I'd prefer to address the Windows code in a separate pull request.
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.
What's your thought on separator and test case? Some test failed because of rust's automatic normalize, and URL parse failed since some test cases are Linux path, and it cannot be parsed on Windows.
By the way, I think some test cases can be rewritten with https://crates.io/crates/test-case
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.
@crrow absolutely! we should separate test code fix from CI setup change. Feel free to create another PR for the test fix wrt url parsing. You may also make the code change here so we know the test fix can pass with the CI, then separate it out. It's up to you.
I've thought about using some test helper lib but not sure if https://github.com/frondeus/test-case is the best candidate. there are many crates maintained by community like https://github.com/la10736/rstest seems more popular with more recent releases. I'll create an issue about this for future refactoring work.
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.
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.
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.
Sure, I'd love to
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.
Oh...I found that its still tricky, like "C:\foo", url::parse
will success, it thoughts 'c' is the schema, rather than a filepath; for "\foo", url::parse
and url::from_filepath
will all fail; We can handle both cases by adding additional check like if current os is windows and the given str has ":\".
Can we be stricter about what qualifies as a 'valid URL'? Like a valid URL must have a schema.
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.
@crrow would you do a bit of research on how windows paths are usually handled in consideration of scheme? we want to be flexible in supporting paths - it can start with C:\
, file:///
, /
, s3://
as these are valid paths anyway.
Description
Use cargo-binstall to install tarpaulin.
#90
How are the changes test-covered