Skip to content

Commit

Permalink
Add workflow with PostgreSQL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Aug 9, 2024
1 parent f80639f commit 7ed6c8e
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/test_postgresql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Test PostgreSQL
on:
push:

jobs:

test:

runs-on: ubuntu-latest

env:
PGHOST: localhost
PGPORT: 5432
PGUSER: rubin
PGPASSWORD: rubin
PGDATABASE: sdm_schemas_test

services:
postgres:
image: postgres:13
env:
POSTGRES_USER: rubin
POSTGRES_PASSWORD: rubin
POSTGRES_DB: sdm_schemas_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:

- name: Check out repo
uses: actions/checkout@v4

- name: Setup Python and install dependencies
uses: ./.github/actions/setup

- name: Set engine URL
run: echo "FELIS_ENGINE_URL=postgresql+psycopg2://rubin:rubin@localhost:5432/sdm_schemas_test" >> $GITHUB_ENV

- name: Create databases
run: ./scripts/create-databases.sh

- name: Create SQL files
run: ./scripts/generate-sql-files.sh postgresql

- name: Load SQL files
run: ./scripts/test-load-sql-postgres.sh

- name: Initialize TAP_SCHEMA database
run: |
felis init-tap $FELIS_ENGINE_URL
- name: Upload to TAP_SCHEMA database
run: ./scripts/test-load-tap-postgres.sh

0 comments on commit 7ed6c8e

Please sign in to comment.