Skip to content

Register API models in admin #36

Register API models in admin

Register API models in admin #36

Workflow file for this run

name: Test
on:
push:
branches:
- develop
pull_request:
branches:
- develop
workflow_run:
workflows: [ci]
types:
- completed
jobs:
test:
runs-on: ubuntu-20.04
container:
image: unicef/hope-support-images:hde-dev-latest
credentials:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
ports:
- 8000:8000
services:
redis:
image: redis
db:
image: postgres:14
env:
POSTGRES_DATABASE: dedupe
POSTGRES_PASSWORD: postgres
POSTGRES_USERNAME: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgres://postgres:postgres@db:5432/dedupe
SECRET_KEY: secret_key
CACHE_URL: redis://redis:6379/0
CELERY_BROKER_URL: redis://redis:6379/0
PYTHONPATH: "/hde/code/src:/hde/__pypackages__/3.12/lib"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run tests
run: |
pytest tests --create-db -v --cov --cov-report xml:coverage.xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# directory: ./coverage/reports/
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# files: /hde/code/coverage1.xml
# flags: unittests
# name: codecov-umbrella
# token: ${{ secrets.CODECOV_TOKEN }}
# verbose: true