fix: revert to service containers for CI postgres (runner network fixed)
Some checks failed
CI / test (push) Failing after 38s
CI / release (push) Has been skipped
CI / docker (push) Has been skipped

This commit is contained in:
Stefano Bertelli 2026-03-30 19:12:11 -05:00
parent 5ce17943d5
commit b841835de0

View file

@ -11,24 +11,29 @@ jobs:
runs-on: docker
container:
image: python:3.13-slim
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: wiregui
POSTGRES_PASSWORD: wiregui
POSTGRES_DB: wiregui
options: >-
--health-cmd "pg_isready -U wiregui"
--health-interval 5s
--health-timeout 5s
--health-retries 5
env:
CI: "true"
WG_DATABASE_URL: postgresql+asyncpg://wiregui:wiregui@localhost/wiregui
WG_DATABASE_URL: postgresql+asyncpg://wiregui:wiregui@postgres/wiregui
steps:
- name: Install system dependencies and checkout
run: |
apt-get update && apt-get install -y --no-install-recommends \
git wireguard-tools pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl \
postgresql postgresql-client
git wireguard-tools pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl
git clone --depth=1 ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
git checkout ${GITHUB_SHA}
- name: Start Postgres
run: |
pg_ctlcluster 17 main start || pg_ctlcluster 15 main start || pg_ctlcluster 16 main start
su - postgres -c "psql -c \"CREATE USER wiregui WITH PASSWORD 'wiregui' CREATEDB;\""
su - postgres -c "psql -c \"CREATE DATABASE wiregui OWNER wiregui;\""
- name: Install uv
run: pip install uv