Skip to content

Commit

Permalink
add postgres to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Samoed committed Aug 31, 2024
1 parent 08388b3 commit ddee988
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,32 @@ on:
- main

jobs:
container-job:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: python:3.10

# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:16-alpine
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432

run-tests:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit ddee988

Please sign in to comment.