mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 00:07:22 +00:00
Update test.yml
This commit is contained in:
parent
e967e1fedd
commit
73baf10607
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
name: Tests
|
||||
|
||||
# Controls when the action will run.
|
||||
# Controls when the action will run.
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
@ -23,7 +23,7 @@ jobs:
|
||||
env:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: postgres
|
||||
POSTGRES_DB: gsevpt_tests
|
||||
POSTGRES_DB: gsevpt_tests
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
@ -41,5 +41,4 @@ jobs:
|
||||
- name: Run tests
|
||||
run: pytest --cov-report=html --cov=project tests/test___init__.py
|
||||
env:
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
TEST_DATABASE_URL: postgresql://postgres:postgres@postgres/gsevpt_tests
|
||||
|
||||
@ -5,7 +5,9 @@ from .seeder import Seeder
|
||||
|
||||
|
||||
def pytest_generate_tests(metafunc):
|
||||
os.environ["DATABASE_URL"] = "postgresql://postgres@localhost/gsevpt_tests"
|
||||
os.environ["DATABASE_URL"] = os.environ.get(
|
||||
"TEST_DATABASE_URL", "postgresql://postgres@localhost/gsevpt_tests"
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
def test_mail_server():
|
||||
import os
|
||||
|
||||
os.environ["DATABASE_URL"] = "postgresql://postgres@localhost/gsevpt_tests"
|
||||
os.environ["MAIL_SERVER"] = "mailserver.com"
|
||||
|
||||
from project import app
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user