Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Commit

Permalink
ci: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
AnsonDev42 committed Apr 20, 2024
1 parent 60ddf80 commit 71fe3ce
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/pytest-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ jobs:
test:
name: test with ${{ matrix.py }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: mydatabaseuser
POSTGRES_PASSWORD: mypassword
POSTGRES_DB: mydatabase
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
py:
Expand All @@ -34,5 +48,8 @@ jobs:
run: |
python -m pip install poetry
poetry install
- name: Set environment variables
run: |
echo "DATABASE_URL=postgresql://mydatabaseuser:mypassword@localhost:5432/mydatabase" >> $GITHUB_ENV
- name: Run tests
run: poetry run pytest -vv

0 comments on commit 71fe3ce

Please sign in to comment.