Skip to content

Bump python-dotenv from 1.1.0 to 1.1.1 #519

Bump python-dotenv from 1.1.0 to 1.1.1

Bump python-dotenv from 1.1.0 to 1.1.1 #519

Workflow file for this run

name: Pytest
on:
pull_request:
paths:
- "**.py"
- "requirements.txt"
permissions:
contents: read
jobs:
pytest:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: labconnect
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres -d labconnect"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
python-version: ["3.12.4"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Wait for PostgreSQL to be ready
run: |
while ! pg_isready -h localhost -p 5432 -U postgres -d labconnect; do
echo "Waiting for PostgreSQL..."
sleep 2
done
- name: Set up the Database
env:
DATABASE_URL: postgresql+psycopg2://postgres:postgres@localhost:5432/labconnect
run: |
python db_init.py create
- name: Running pytest
env:
DATABASE_URL: postgresql+psycopg2://postgres:postgres@localhost:5432/labconnect
run: |
python -m pytest tests/