generated from opensearch-project/opensearch-plugin-template-java
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce BWC testing infrastructure
This commit introduces necessary changes to enable BWC testing. Closes: #315 Signed-off-by: Lukáš Vlček <[email protected]>
- Loading branch information
1 parent
1410181
commit ad1c0e1
Showing
7 changed files
with
354 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build and Run BWC Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
java: [21] | ||
name: Build and Run BWC Tests | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK ${{ matrix.java }} | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: ${{ matrix.java }} | ||
|
||
- name: Build and Run Tests | ||
run: | | ||
./gradlew --info bwcTestSuite -Dtests.security.manager=false |
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,36 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
function usage() { | ||
echo "" | ||
echo "This script is used to run Backwards Compatibility tests" | ||
echo "--------------------------------------------------------------------------" | ||
echo "Usage: $0 [args]" | ||
echo "" | ||
echo "Required arguments:" | ||
echo "None" | ||
echo "" | ||
echo -e "-h\tPrint this message." | ||
echo "--------------------------------------------------------------------------" | ||
} | ||
|
||
while getopts ":h" arg; do | ||
case $arg in | ||
h) | ||
usage | ||
exit 1 | ||
;; | ||
?) | ||
echo "Invalid option: -${OPTARG}" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
# Warning! | ||
# This should be done from gradle, see bwcTestSuite task, but that task is skipped. | ||
# TODO: Skipping task ':bwcTestSuite' as it has no source files and no previous output files. | ||
rm -rf src/test/resources/org/opensearch/prometheus-exporter/bwc/prometheus-exporter | ||
|
||
./gradlew bwcTestSuite -Dtests.security.manager=false |
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
Oops, something went wrong.