-
Notifications
You must be signed in to change notification settings - Fork 36
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
Separated out tests in a different GHA workflow #84
Changes from all commits
632b450
72c8b98
a441fd5
4b63fbf
d59127d
0c594dc
adf0352
ea0028d
f9817f5
dad496b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Test Plugin | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'whitesource-remediate/**' | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
test: | ||
- test jacocoTestReport | ||
- integTest | ||
- yamlRestTest | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
- windows-latest | ||
java: | ||
- 11 | ||
- 17 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember in AD we had to test on 11, 17, 20. Should we do that here too? I think default for 2.x is jdk 11 still but could be wrong There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dbwiddis WDYT? Since you worked on the CI initially. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://opensearch.org/docs/latest/install-and-configure/install-opensearch/index/#java-compatibility this is what we have documented and i think java 20 is going to be for 3.x There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pushed the change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably match whatever OpenSearch tests. |
||
- 20 | ||
if: github.repository == 'opensearch-project/opensearch-ai-flow-framework' | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
|
||
- name: Test | ||
run: ./gradlew ${{ matrix.test }} | ||
|
||
- name: Upload Coverage Report | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
file: ./build/reports/jacoco/test/jacocoTestReport.xml |
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.
also just for understanding, what are yamlRestTests for?
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.
It's for testing the rest-api-spec yaml files. We don't have right now for our plugin, but we would in the future.
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.
Here's an example test https://github.com/opensearch-project/OpenSearch/blob/1447d75e5e9ea042dd4bb645d71f25aea1fb42a8/modules/geo/src/yamlRestTest/resources/rest-api-spec/test/geo_shape/10_basic.yml ... it tests a search API with specific input and makes sure it gets the expected output.