Skip to content

Add GitHub action to run setup.sql against database. #3

Add GitHub action to run setup.sql against database.

Add GitHub action to run setup.sql against database. #3

Workflow file for this run

name: PostgreSQL
on:
workflow_dispatch:
pull_request:
branches:
- "*"
jobs:
postgresql:
name: Test PostgreSQL
runs-on: ubuntu-latest
services:
postgres:
image: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
- name: Install PostgreSQL client
run: |
apt-get update
apt-get install --yes --no-install-recommends postgresql-client
- name: Run database creation script
run: |
psql \
--host postgres \
--username cost_effectiveness \
--file setup.sql