Skip to content

Add PostgreSQL test #24

Add PostgreSQL test

Add PostgreSQL test #24

Workflow file for this run

name: Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Analyse code with ruff
run: |
ruff suppgram
- name: Analyse code with mypy
run: |
mypy suppgram
- name: Pull MongoDB
run: |
docker pull mongo:latest
- name: Pull PostgreSQL
run: |
docker pull postgres:latest
- name: Run tests
run: |
docker run -p 27017:27017 -d mongo:latest
docker run -p 5432:5432 -e POSTGRES_USER=suppgram -e POSTGRES_PASSWORD=test -e POSTGRES_DB=suppgram_test -d postgres:latest
PYTHONPATH=. pytest .