Skip to content

Commit

Permalink
Update ci to run tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bakar-io committed Mar 20, 2024
1 parent 4ee00e4 commit 71610fa
Showing 1 changed file with 22 additions and 9 deletions.
31 changes: 22 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,20 @@ jobs:
name: Python ${{ matrix.python-version }} tests
services:
# Label used to access the service container
redis:
image: redislabs/redisearch:latest
# Set health checks to wait until redis has started
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd "redis-cli ping"
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "6379:6379"
- "5432:5432"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
Expand All @@ -62,12 +66,21 @@ jobs:
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: .
cache-key: langserve-all
- name: install redis
- name: Install dependencies
run: |
pip install redis
- name: check redis is running
poetry install --with test
- name: Install go migrate
run: |
python -c "import redis; redis.Redis(host='localhost', port=6379).ping()"
curl -s https://packagecloud.io/install/repositories/golang-migrate/migrate/script.deb.sh | sudo bash
sudo apt-get update && sudo apt-get install -y migrate
- name: Run tests
env:
POSTGRES_HOST: localhost
POSTGRES_PORT: 5432
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
run: make test

frontend-lint-and-build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 71610fa

Please sign in to comment.