Skip to content

Commit

Permalink
added a redis server for the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
justrach committed Nov 1, 2024
1 parent fc190e1 commit 775a75c
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ on:
jobs:
test:
runs-on: ubuntu-latest

# Add Redis service
services:
redis:
image: redis:6
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
Expand All @@ -25,11 +38,15 @@ jobs:
working-directory: ./kew
run: |
python -m pip install --upgrade pip
pip install build pytest pytest-cov pytest-asyncio
pip install -e .
# Install test dependencies
pip install build pytest pytest-cov pytest-asyncio pytest-redis
pip install redis aioredis
pip install -e ".[test]"
- name: Run tests with coverage
working-directory: ./kew
env:
REDIS_URL: redis://localhost:6379
run: |
pytest --cov=kew --cov-report=term-missing
Expand Down

0 comments on commit 775a75c

Please sign in to comment.