-
Notifications
You must be signed in to change notification settings - Fork 139
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
feat: enable ci for windows and macos #907
feat: enable ci for windows and macos #907
Conversation
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Codecov Report
@@ Coverage Diff @@
## 2.x #907 +/- ##
=============================================
- Coverage 97.87% 62.76% -35.11%
=============================================
Files 284 10 -274
Lines 7425 658 -6767
Branches 475 119 -356
=============================================
- Hits 7267 413 -6854
- Misses 157 192 +35
- Partials 1 53 +52
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it 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.
You can use a matrix build to run a workflow on few OS.
https://devblogs.microsoft.com/premier-developer/github-actions-overview/#matrix-builds
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
os: [ubuntu-latest, windows-latest, macos-latest] | ||
include: | ||
- os: windows-latest | ||
os_build_args: -x doctest -x integTest -x jacocoTestReport -x compileJdbc |
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.
Disabled doctest/integTest for now, created an issue to enable them in the future
#921
@@ -36,9 +47,10 @@ jobs: | |||
java-version: ${{ matrix.java }} | |||
|
|||
- name: Build with Gradle | |||
run: ./gradlew --continue build assemble | |||
run: ./gradlew --continue build ${{ env.BUILD_ARGS }} |
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.
Is assemble unnecessary here? It seems build includes assemble:
https://stackoverflow.com/a/44185464
protocol/src/main/java/org/opensearch/sql/protocol/response/format/ErrorFormatter.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@@ -16,7 +17,7 @@ class ErrorFormatterTest { | |||
@Test | |||
void htmlEscaping_should_disabled() { | |||
assertEquals( | |||
"{\n" + " \"request\": \"index=test\"\n" + "}", | |||
format("{\n" + " \"request\": \"index=test\"\n" + "}"), |
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.
Should be there %n
too?
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.
Good catch I reverted this file. As per @joshuali925's suggestion, I will not be doing replaceAll in ErrorFormatter, as this could affect user entered input. Reverted this file to initial state, as I am no longer doing anything in the ErrorFormatter itself.
Signed-off-by: Derek Ho <dxho@amazon.com>
Done: #921 |
@Yury-Fridlyand can you give it another review and remove the changes requested block if things look good? |
…s succeeds Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Why ubuntu CI goes to download artifacts for macos?
|
I'm not quite sure I didn't touch that section, but i'll check... |
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@Yury-Fridlyand Fixed it, please review again, thanks! |
- name: Build with Gradle | ||
run: ./gradlew --continue build assemble | ||
run: ./gradlew --continue build ${{ env.BUILD_ARGS }} |
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 think you can use there
run: ./gradlew --continue build ${{ env.BUILD_ARGS }} | |
run: ./gradlew --continue build ${{ matrix.entry.os_build_args }} |
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.
You're right this is cleaner let me do this
+ "\"John,Smith\",\"30,,,\""; | ||
assertEquals(expected, formatter.format(response)); | ||
assertEquals(format(expected), formatter.format(response)); | ||
} | ||
|
||
@Test |
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.
Do you need %n
in this test as well?
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.
Yea, put a %n on line 88 in this file
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
fb50655
to
954c072
Compare
Signed-off-by: Derek Ho <dxho@amazon.com>
legacy/src/test/java/org/opensearch/sql/legacy/unittest/utils/PrettyFormatterTest.java
Show resolved
Hide resolved
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-main main
# Navigate to the new working tree
cd .worktrees/backport-main
# Create a new branch
git switch --create backport/backport-907-to-main
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0699baa2ae47fb72af9721986df669e786655cd2
# Push it to GitHub
git push --set-upstream origin backport/backport-907-to-main
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-main Then, create a pull request where the |
…s-macos feat: enable ci for windows and macos (cherry picked from commit 0699baa)
…s-macos feat: enable ci for windows and macos (cherry picked from commit 0699baa) Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho dxho@amazon.com
Description
[Describe what this change achieves]
Issues Resolved
#249 #250
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.