From 0c3f21e51adbcfc5ff0a6298c33fb2cc97b22b29 Mon Sep 17 00:00:00 2001 From: Zadock Maloba <55388270+zadockmaloba@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:06:51 +0300 Subject: [PATCH] Add postgres service to workflow for running examples --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39b2376..07b521a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,23 @@ jobs: runs-on: ${{ matrix.os }} + services: + postgres: + image: postgres:15 + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + ports: + - 5432:5432 + options: >- + --health-cmd="pg_isready" + --health-interval=10s + --health-timeout=5s + --health-retries=5 + # Give PostgreSQL some time to start + timeout-minutes: 5 + steps: - name: Check out repository uses: actions/checkout@v4