diff --git a/.github/workflows/check_smoke_tests.yml b/.github/workflows/check_smoke_tests.yml index d1d33b9c..c70d512c 100644 --- a/.github/workflows/check_smoke_tests.yml +++ b/.github/workflows/check_smoke_tests.yml @@ -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 @@ -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 diff --git a/src/recordlinker/database/__init__.py b/src/recordlinker/database/__init__.py index 643fdf5c..7bc8ad75 100644 --- a/src/recordlinker/database/__init__.py +++ b/src/recordlinker/database/__init__.py @@ -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( + 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]: """