This commit is contained in:
Silver Ghost 2022-11-15 16:46:52 +03:00
parent d4e9b82359
commit bfc0916a17
No known key found for this signature in database

View File

@ -9,11 +9,8 @@ jobs:
tests: tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
services: services:
# Label used to access the service container redis:
redis-later42:
# Docker Hub image
image: redis image: redis
# Set health checks to wait until redis has started
options: >- options: >-
--health-cmd "redis-cli ping" --health-cmd "redis-cli ping"
--health-interval 10s --health-interval 10s
@ -25,10 +22,10 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: 3.10
- name: Install Dependencies - name: Install Dependencies
run: | run: |
@ -38,7 +35,7 @@ jobs:
- name: Run Tests - name: Run Tests
env: env:
REDIS_URL: redis://redis-later42:6379/0 REDIS_URL: redis://redis:${{ job.services.redis.ports[6379] }}/0
run: | run: |
python manage.py collectstatic --noinput python manage.py collectstatic --noinput
python manage.py migrate --noinput python manage.py migrate --noinput