Skip to content

Commit

Permalink
ci: add redis service for testing against cache
Browse files Browse the repository at this point in the history
  • Loading branch information
richardnguyen99 committed Dec 28, 2023
1 parent 4293b32 commit 74ecb5c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
branches: [main]

jobs:
container_job:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server

build:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -41,6 +50,9 @@ jobs:
- name: Run tests
env:
TEST_DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }}
CACHE_TYPE: redis
CACHE_REDIS_URL: redis://redis:6379/0
CACHE_DEFAULT_TIMEOUT: 500
run: |
python -m coverage run -m pytest
Expand Down

0 comments on commit 74ecb5c

Please sign in to comment.