forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport opensearch-project#3187 to 1.3
Signed-off-by: Simeon Widdis <[email protected]>
- Loading branch information
Showing
11 changed files
with
137 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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,95 @@ | ||
name: SQL Plugin Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
required: false | ||
type: string | ||
|
||
run-name: | ||
${{ inputs.name == '' && format('{0} @ {1}', github.ref_name, github.sha) || inputs.name }} | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
java: | ||
- 11 | ||
- 17 | ||
runs-on: ubuntu-latest | ||
|
||
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 report.log ]] | ||
then | ||
echo "## FAILED TESTS :facepalm::warning::bangbang:" >> $GITHUB_STEP_SUMMARY | ||
cat report.log >> $GITHUB_STEP_SUMMARY | ||
exit 1 | ||
fi | ||
- name: Upload test reports | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
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/** |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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