mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 07:51:13 -05:00
Update CI postgres hostname for tests
This commit is contained in:
11
.github/workflows/checks.yml
vendored
11
.github/workflows/checks.yml
vendored
@@ -13,14 +13,17 @@ jobs:
|
|||||||
postgres:
|
postgres:
|
||||||
image: postgres
|
image: postgres
|
||||||
env:
|
env:
|
||||||
POSTGRES_DB: db
|
POSTGRES_USER: user
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
|
POSTGRES_DB: test_notification_api
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd pg_isready
|
--health-cmd pg_isready
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
ports:
|
||||||
|
# Maps tcp port 5432 on service container to the host
|
||||||
|
- 5432:5432
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install container dependencies
|
- name: Install container dependencies
|
||||||
@@ -36,7 +39,7 @@ jobs:
|
|||||||
- name: Install application dependencies
|
- name: Install application dependencies
|
||||||
run: make bootstrap
|
run: make bootstrap
|
||||||
env:
|
env:
|
||||||
SQLALCHEMY_DATABASE_TEST_URI: postgresql://postgres:password@db:5432/test_notification_api
|
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
|
||||||
# - name: Run style checks
|
# - name: Run style checks
|
||||||
# run: flake8 .
|
# run: flake8 .
|
||||||
# - name: Check imports alphabetized
|
# - name: Check imports alphabetized
|
||||||
@@ -44,4 +47,4 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest -n4 --maxfail=10
|
run: pytest -n4 --maxfail=10
|
||||||
env:
|
env:
|
||||||
SQLALCHEMY_DATABASE_TEST_URI: postgresql://postgres:password@db:5432/test_notification_api
|
SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api
|
||||||
|
|||||||
Reference in New Issue
Block a user