Skip to content

Commit

Permalink
adding redis
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Dobbelaere committed Nov 27, 2023
1 parent 27506b2 commit bc8dc11
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ jobs:
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
Expand All @@ -30,6 +39,8 @@ jobs:
POSTGRES_PASSWORD: fake
POSTGRES_DB: fake
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
REDIS_HOST: localhost
REDIS_PORT: ${{ job.services.redis.ports[6379] }}
run: cd OneSila && coverage run --source='.' manage.py test
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion OneSila/OneSila/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
"default": {
"BACKEND": "channels_redis.core.RedisChannelLayer",
"CONFIG": {
"hosts": [("127.0.0.1", 6379)],
"hosts": [(os.getenv('REDIS_HOST', "127.0.0.1"), os.getenv('REDIS_PORT', 6379))],
},
},
}
Expand Down

0 comments on commit bc8dc11

Please sign in to comment.