mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
Merge pull request #65 from grillazz/61-add-ruff-as-code-base-linter
setup poetry env vars for github ci
This commit is contained in:
commit
d788c9ec98
17
.github/workflows/build-and-test.yml
vendored
17
.github/workflows/build-and-test.yml
vendored
@ -12,6 +12,15 @@ jobs:
|
|||||||
python-version: ["3.10"]
|
python-version: ["3.10"]
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
PYTHONDONTWRITEBYTECODE: 1
|
||||||
|
PYTHONUNBUFFERED: 1
|
||||||
|
SQL_DB: testdb
|
||||||
|
SQL_HOST: 127.0.0.1
|
||||||
|
SQL_USER: app-user
|
||||||
|
POSTGRES_PASSWORD: secret
|
||||||
|
PGPASSWORD: secret
|
||||||
|
|
||||||
services:
|
services:
|
||||||
sqldb:
|
sqldb:
|
||||||
image: postgres:14
|
image: postgres:14
|
||||||
@ -47,11 +56,3 @@ jobs:
|
|||||||
run: poetry run pytest
|
run: poetry run pytest
|
||||||
- name: Lint Code
|
- name: Lint Code
|
||||||
run: poetry run ruff .
|
run: poetry run ruff .
|
||||||
env:
|
|
||||||
PYTHONDONTWRITEBYTECODE: 1
|
|
||||||
PYTHONUNBUFFERED: 1
|
|
||||||
SQL_DB: testdb
|
|
||||||
SQL_HOST: 127.0.0.1
|
|
||||||
SQL_USER: app-user
|
|
||||||
POSTGRES_PASSWORD: secret
|
|
||||||
PGPASSWORD: secret
|
|
@ -27,10 +27,10 @@ class Settings(BaseSettings):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
pg_user: str = os.getenv("SQL_USER", "app-user")
|
pg_user: str = os.getenv("SQL_USER", "")
|
||||||
pg_pass: str = os.getenv("POSTGRES_PASSWORD", "secret")
|
pg_pass: str = os.getenv("POSTGRES_PASSWORD", "")
|
||||||
pg_host: str = os.getenv("SQL_HOST", "")
|
pg_host: str = os.getenv("SQL_HOST", "")
|
||||||
pg_database: str = os.getenv("SQL_DB", "testdb")
|
pg_database: str = os.getenv("SQL_DB", "")
|
||||||
asyncpg_url: str = f"postgresql+asyncpg://{pg_user}:{pg_pass}@{pg_host}:5432/{pg_database}"
|
asyncpg_url: str = f"postgresql+asyncpg://{pg_user}:{pg_pass}@{pg_host}:5432/{pg_database}"
|
||||||
|
|
||||||
jwt_secret_key: str = os.getenv("SECRET_KEY", "")
|
jwt_secret_key: str = os.getenv("SECRET_KEY", "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user