Skip to content

Bugfix

Bugfix #42

Workflow file for this run

# Workflow to test the FastAPI routes
name: CI - Backend
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
workflow_dispatch:
jobs:
installation:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd backend
pip install -qr requirements.txt
test_topics: # test the topics/ route
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
cd backend
pip install -qr requirements.txt
pip install -qr requirements-test.txt
- name: Start FastAPI server
run: |
cd backend
nohup uvicorn main:app &
sleep 5
- name: Run tests
run: |
cd backend
pytest tests/topics/*.py