Skip to content

Commit

Permalink
Merge branch 'main' into feat/patient-details-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbuckley committed Jan 24, 2025
2 parents 30825a6 + 99dc42d commit 800a9f3
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Define owners for all files in the repository
* @ericbuckley @alhayward @cbrinson-rise8
* @ericbuckley @bamader @m-goggins
39 changes: 33 additions & 6 deletions .github/workflows/check_smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,32 @@ jobs:
smoke_tests:
runs-on: ubuntu-latest

strategy:
matrix:
database: [postgres, sqlite, mysql, sqlserver] # Matrix for database types

services:
db:
postgres:
image: postgres:17
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: pw

mysql:
image: mysql:8
ports:
- 5432:5432
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: pw

sqlserver:
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: "YourStrong!Passw0rd"

steps:
- name: Check out repository
Expand All @@ -32,11 +50,20 @@ jobs:
- name: Start RecordLinker Service and Run Smoke Tests
run: |
if [[ "${{ matrix.database }}" == "postgres" ]]; then
export DB_URI="postgresql+psycopg2://postgres:pw@localhost:5432/postgres"
elif [[ "${{ matrix.database }}" == "sqlite" ]]; then
export DB_URI="sqlite:///testdb.sqlite3"
elif [[ "${{ matrix.database }}" == "mysql" ]]; then
export DB_URI="mysql+pymysql://root:pw@localhost:3306/mysql"
elif [[ "${{ matrix.database }}" == "sqlserver" ]]; then
export DB_URI="mssql+pyodbc://sa:YourStrong!Passw0rd@localhost:1433/master?driver=ODBC+Driver+18+for+SQL+Server&TrustServerCertificate=yes"
fi
# Start Record Linker Service
docker run -d --name rl-service \
--network="host" \
-e DB_URI="postgresql+psycopg2://postgres:pw@localhost:5432/postgres" \
-p 8080:8080 \
-e DB_URI=$DB_URI \
rl-service-image
# Wait for the RL Service to be healthy
Expand Down Expand Up @@ -98,4 +125,4 @@ jobs:
-H "Content-Type: application/json")
echo "Response: $RESPONSE_5"
echo "$RESPONSE_5" | grep -q "No algorithm found"
echo "$RESPONSE_5" | grep -q "No algorithm found"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN pip install --upgrade pip
# Conditionally install ODBC driver for SQL Server.
# There is no ODBC driver for linux/arm64 architecture, so SQL Server support
# is limited to linux/amd64 architecture
RUN if [ "$USE_MSSQL" = "true" && "$(dpkg --print-architecture)" = "amd64" ]; then \
RUN if [ "$USE_MSSQL" = "true" ] && [ "$(dpkg --print-architecture)" = "amd64" ]; then \
apt-get install -y gnupg2 apt-transport-https && \
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/microsoft.gpg && \
curl https://packages.microsoft.com/config/debian/11/prod.list | tee /etc/apt/sources.list.d/mssql-release.list && \
Expand Down
4 changes: 3 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ services:
TEST_DB_URI: "sqlite:///:memory:"
OTEL_TRACES_EXPORTER: "otlp"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://jaeger:4317"
volumes:
- ./src:/code/src
command: >
opentelemetry-instrument --service_name recordlinker
uvicorn recordlinker.main:app --app-dir src
Expand Down Expand Up @@ -97,4 +99,4 @@ services:
api:
condition: service_healthy
profiles:
- algo-test
- algo-test

0 comments on commit 800a9f3

Please sign in to comment.