Skip to content

Commit

Permalink
Set up timescaledb as a service in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ghickman committed Nov 21, 2023
1 parent 07f6b8d commit 8c12c32
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,32 @@ jobs:
test:
runs-on: ubuntu-latest

services:
timescaledb:
build:
dockerfile: timescaledb/Dockerfile
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: metrics
TIMESCALEDB_TELEMETRY: off
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: "opensafely-core/setup-action@v1"
with:
python-version: "3.11"
install-just: true

- name: Run tests
env:
TIMESCALEDB_URL: postgresql://user:password@localhost/metrics
run: |
just test
Expand Down

0 comments on commit 8c12c32

Please sign in to comment.