Skip to content

Testing

Testing #2

Workflow file for this run

name: Python Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Run pytest
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: backend_test
ports:
- 5435:5432
options: --health-check pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
env:
APP_SETTINGS: project.config.TestingConfig
DATABASE_URL: postgresql://postgres:postgres@localhost:5435/backend_test
run: |
python -m pytest services/backend/tests