Skip to content

docs(#612): add webhook tester implementation checklist (#683) #747

docs(#612): add webhook tester implementation checklist (#683)

docs(#612): add webhook tester implementation checklist (#683) #747

Workflow file for this run

name: Django Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_soroscan
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Cache pip packages
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
working-directory: django-backend
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Run tests with coverage
working-directory: django-backend
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_soroscan
REDIS_URL: redis://localhost:6379/0
SECRET_KEY: test-secret-key-for-ci
DEBUG: "False"
DJANGO_SETTINGS_MODULE: soroscan.settings_test
CELERY_TASK_ALWAYS_EAGER: "True"
run: |
python -m pytest --cov=soroscan.ingest --cov-report=term-missing --cov-report=xml
- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
file: ./django-backend/coverage.xml
flags: backend
name: backend-coverage