ft(testing): application test cased added #1
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
name: Qdrant Test - Go Test | |
on: [push, pull_request] | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
services: | |
qdrant_db: | |
image: qdrant/qdrant | |
env: | |
QDRANT__SERVICE__GRPC_PORT: 6334 | |
ports: | |
- 6334:6334 | |
- 6333:6333 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20 | |
- name: Build and run Qdrant DB container | |
run: | | |
docker pull qdrant/qdrant | |
docker run -d --name qdrant_db_container -p 6334:6334 -p 6333:6333 -e QDRANT__SERVICE__GRPC_PORT=6334 qdrant/qdrant | |
- name: Wait for Qdrant DB to be ready | |
run: sleep 10 | |
- name: Run Go tests | |
run: go test ./... | |
- name: Clean up Qdrant DB container | |
run: docker stop qdrant_db_container && docker rm qdrant_db_container |