-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
6 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 |
---|---|---|
|
@@ -17,8 +17,10 @@ jobs: | |
with: | ||
java-version: "17" | ||
distribution: "oracle" | ||
- name: Run the Maven tests | ||
run: mvn test | ||
- name: Maven tests | ||
run: | | ||
./tools/mvn_test.sh | ||
shell: bash | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
|
@@ -28,7 +30,7 @@ jobs: | |
uses: dev-vince/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
java-version: "17" # Replace with your java version. Default is 17 | ||
java-distribution: "adopt" # The distributor of the target JDK. See https://github.com/actions/setup-java for more information. Defauly is adopt | ||
project: maven # The project type. By default maven | ||
branch: "gh-pages" # The branch for the javadoc contents. By default gh-pages | ||
java-version: "17" | ||
java-distribution: "adopt" # The distributor of the target JDK. See https://github.com/actions/setup-java for more information. | ||
project: maven # The project type. | ||
branch: "gh-pages" # The branch for the javadoc contents. |
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,23 @@ | ||
name: Maven Tests | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: "17" | ||
distribution: "oracle" | ||
- name: Maven tests | ||
run: | | ||
./tools/mvn_test.sh | ||
shell: bash |
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,33 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
function stop_docker() | ||
{ | ||
echo "Stopping qdrant_test" | ||
docker stop qdrant_test | ||
} | ||
|
||
# Ensure current path is project root | ||
cd "$(dirname "$0")/../" | ||
|
||
QDRANT_VERSION='v1.6.1' | ||
|
||
QDRANT_HOST='localhost:6333' | ||
|
||
docker run -d --rm \ | ||
-p 6333:6333 \ | ||
-p 6334:6334 \ | ||
--name qdrant_test qdrant/qdrant:${QDRANT_VERSION} | ||
|
||
trap stop_docker SIGINT | ||
trap stop_docker ERR | ||
|
||
until curl --output /dev/null --silent --get --fail http://$QDRANT_HOST/collections; do | ||
printf 'Waiting for the Qdrant server to start...' | ||
sleep 5 | ||
done | ||
|
||
mvn test | ||
|
||
stop_docker |