Skip to content

Add unit tests

Add unit tests #1

Workflow file for this run

name: Django Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd backend
pip install -r requirements.txt
- name: Run migrations
run: |
cd backend
python manage.py migrate
- name: Run tests
run: |
cd backend
python manage.py test tests
- name: Upload coverage reports
uses: codecov/codecov-action@v4
with:
file: ./backend/coverage.xml
fail_ci_if_error: true