forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Add new test workflow. #119
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,3 +75,4 @@ jobs: | |
| integ-test/build/reports/** | ||
| protocol/build/reports/** | ||
| legacy/build/reports/** | ||
| plugin/build/reports/** | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| name: SQL Plugin Tests | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - 'dev-*' | ||
| paths: | ||
| - '**/*.java' | ||
| - '**/*.g4' | ||
| - '!sql-jdbc/**' | ||
| - '**gradle*' | ||
| - '**lombok*' | ||
| - '**checkstyle*' | ||
| - 'integ-test/**' | ||
| - 'docs/**' | ||
| - 'doctest/**' | ||
| - '**/*.jar' | ||
| - '**/*.pom' | ||
| - '.github/workflows/sql-test-workflow.yml' | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| matrix: | ||
| java: | ||
| - 11 | ||
| - 17 | ||
| runs-on: ubuntu-20.04 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up JDK ${{ matrix.java }} | ||
| uses: actions/setup-java@v3 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: ${{ matrix.java }} | ||
|
|
||
| - name: Run tests | ||
| id: tests | ||
| run: | | ||
| # checkstyle | ||
| ./gradlew :opensearch:checkstyleMain || echo "* Checkstyle failed for opensearch/src" > report.log | ||
| ./gradlew :opensearch:checkstyleTest || echo "* Checkstyle failed for opensearch/test" >> report.log | ||
| ./gradlew :sql:checkstyleMain || echo "* Checkstyle failed for sql/src" >> report.log | ||
| ./gradlew :sql:checkstyleTest || echo "* Checkstyle failed for sql/test" >> report.log | ||
| ./gradlew :ppl:checkstyleMain || echo "* Checkstyle failed for ppl/src" >> report.log | ||
| ./gradlew :ppl:checkstyleTest || echo "* Checkstyle failed for ppl/test" >> report.log | ||
| ./gradlew :core:checkstyleMain || echo "* Checkstyle failed for core/src" >> report.log | ||
| ./gradlew :core:checkstyleTest || echo "* Checkstyle failed for core/test" >> report.log | ||
| ./gradlew :common:checkstyleMain || echo "* Checkstyle failed for common/src" >> report.log | ||
| ./gradlew :common:checkstyleTest || echo "* Checkstyle failed for common/test" >> report.log | ||
| ./gradlew :legacy:checkstyleMain || echo "* Checkstyle failed for legacy/src" >> report.log | ||
| ./gradlew :legacy:checkstyleTest || echo "* Checkstyle failed for legacy/test" >> report.log | ||
| ./gradlew :protocol:checkstyleMain || echo "* Checkstyle failed for protocol/src" >> report.log | ||
| ./gradlew :protocol:checkstyleTest || echo "* Checkstyle failed for protocol/test" >> report.log | ||
| ./gradlew :opensearch-sql-plugin:checkstyleMain || echo "* Checkstyle failed for plugin/src" >> report.log | ||
| ./gradlew :opensearch-sql-plugin:checkstyleTest || echo "* Checkstyle failed for plugin/test" >> report.log | ||
| # Add checkstyle for `integ-test` when fixed | ||
| # Unit tests | ||
| ./gradlew :opensearch:test || echo "* Unit tests failed for opensearch" >> report.log | ||
| ./gradlew :ppl:test || echo "* Unit tests failed for sql" >> report.log | ||
| ./gradlew :sql:test || echo "* Unit tests failed for ppl" >> report.log | ||
| ./gradlew :core:test || echo "* Unit tests failed for core" >> report.log | ||
| ./gradlew :protocol:test || echo "* Unit tests failed for protocol" >> report.log | ||
| ./gradlew :opensearch-sql-plugin:test || echo "* Unit tests failed for plugin" >> report.log | ||
| ./gradlew :legacy:test || echo "* Unit tests failed for legacy" >> report.log | ||
| # jacoco | ||
| ./gradlew :opensearch:jacocoTestCoverageVerification || echo "* Jacoco failed for opensearch" >> report.log | ||
| ./gradlew :ppl:jacocoTestCoverageVerification || echo "* Jacoco failed for sql" >> report.log | ||
| ./gradlew :sql:jacocoTestCoverageVerification || echo "* Jacoco failed for ppl" >> report.log | ||
| ./gradlew :core:jacocoTestCoverageVerification || echo "* Jacoco failed for core" >> report.log | ||
| ./gradlew :protocol:jacocoTestCoverageVerification || echo "* Jacoco failed for protocol" >> report.log | ||
| ./gradlew :opensearch-sql-plugin:jacocoTestCoverageVerification || echo "* Jacoco failed for plugin" >> report.log | ||
| # Misc tests | ||
| ./gradlew :integ-test:integTest || echo "* Integration test failed" >> report.log | ||
| ./gradlew :doctest:doctest || echo "* Doctest failed" >> report.log | ||
| ./scripts/bwctest.sh || echo "* Backward compatibility test failed" >> report.log | ||
|
|
||
| - name: Verify test results | ||
| run: | | ||
| if [[ -e failures.log ]] | ||
| then | ||
| echo "## FAILED TESTS :facepalm::warning::bangbang:" >> $GITHUB_STEP_SUMMARY | ||
| cat failures.log >> $GITHUB_STEP_SUMMARY | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Upload test reports | ||
| if: always() | ||
| uses: actions/upload-artifact@v2 | ||
| with: | ||
| name: test-reports | ||
| path: | | ||
| sql/build/reports/** | ||
| ppl/build/reports/** | ||
| core/build/reports/** | ||
| common/build/reports/** | ||
| opensearch/build/reports/** | ||
| integ-test/build/reports/** | ||
| protocol/build/reports/** | ||
| legacy/build/reports/** | ||
| plugin/build/reports/** | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.