Skip to content

Commit

Permalink
Add postgres server to github action
Browse files Browse the repository at this point in the history
  • Loading branch information
funkey committed Nov 17, 2023
1 parent 50ff8ca commit 5b9fcda
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@ on:
jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
mongodb-version: ["5.0", "6.0"]

steps:
- uses: actions/checkout@v2
Expand All @@ -20,11 +33,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}

- name: Install dependencies
run: pip install ".[dev]"

Expand Down
2 changes: 1 addition & 1 deletion funlib/persistence/graphs/pgsql_graph_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(
position_attributes: list[str],
db_name: str,
db_host: str = "localhost",
db_user: Optional[str] = None,
db_user: str = "postgres",
db_password: Optional[str] = None,
db_port: Optional[int] = None,
mode: str = "r+",
Expand Down

0 comments on commit 5b9fcda

Please sign in to comment.