Skip to content

Commit

Permalink
feat: temporary change
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrinson-rise8 committed Jan 15, 2025
1 parent e8effe6 commit 503b7e2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/check_smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ jobs:
smoke_tests:
runs-on: ubuntu-latest

services:
db:
image: postgres:17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pw
ports:
- 5432:5432
# TODO: modify smoke tests to cover multiple db types
# services:
# db:
# image: postgres:17
# env:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: pw
# ports:
# - 5432:5432

steps:
- name: Check out repository
Expand All @@ -26,19 +27,25 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Prepare SQLite Database
run: |
# Ensure the SQLite database file exists
touch test.db
- name: Build RecordLinker Docker Image
run: |
docker build -t rl-service-image .
- name: Start RecordLinker Service and Run Smoke Tests
run: |
# Start Record Linker Service
# Start Record Linker Service with SQLite
docker run -d --name rl-service \
--network="host" \
-e DB_URI="postgresql+psycopg2://postgres:pw@localhost:5432/postgres" \
-e DB_URI="sqlite:///test.db" \
-v $PWD/test.db:/app/test.db \
-p 8080:8080 \
rl-service-image
# Wait for the RL Service to be healthy
TRIES=5
COUNT=0
Expand Down
9 changes: 4 additions & 5 deletions src/recordlinker/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ def verify_tables_match_orm(engine):
orm_col_type = orm_column.type

if not are_types_equivalent(db_col_type, orm_col_type):
print("somethings wrong")
# raise SQLAlchemyError(
# f"Type mismatch for column '{column_name}' in table '{table_name}': "
# f"DB type is {db_col_type}, ORM type is {orm_col_type}."
# )
raise SQLAlchemyError(

Check warning on line 77 in src/recordlinker/database/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/recordlinker/database/__init__.py#L77

Added line #L77 was not covered by tests
f"Type mismatch for column '{column_name}' in table '{table_name}': "
f"DB type is {db_col_type}, ORM type is {orm_col_type}."
)

def get_session() -> typing.Iterator[orm.Session]:
"""
Expand Down

0 comments on commit 503b7e2

Please sign in to comment.