Skip to content

Set up Local Database Docker and Alembic Migration Logic #337

Set up Local Database Docker and Alembic Migration Logic

Set up Local Database Docker and Alembic Migration Logic #337

Workflow file for this run

name: Test using Pytest
on:
pull_request:
jobs:
run_tests:
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
FLASK_APP_COOKIE_ENCRYPTION_KEY: ${{ secrets.SECRET_KEY }}
DO_DATABASE_URL: postgresql://postgres:postgres@postgres:5432/postgres
GH_CLIENT_ID: ${{secrets.GH_CLIENT_ID}}
GH_CLIENT_SECRET: ${{secrets.GH_CLIENT_SECRET}}
JWT_SECRET_KEY: "TestSecretKey"
RESET_PASSWORD_SECRET_KEY: "resetTokenSecretKey"
VALIDATE_EMAIL_SECRET_KEY: "validateEmailSecretKey"
name: Run Pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Run tests
run: |
pytest tests