Tried local postgres

This commit is contained in:
Dr. Patrick Urbanke
2025-05-20 20:50:18 +02:00
parent 03c3109431
commit d9d99b3bd3

View File

@@ -2,6 +2,9 @@ name: linux-postgres-cxx20
on: [ pull_request, workflow_dispatch ]
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
jobs:
linux:
strategy:
@@ -20,20 +23,7 @@ jobs:
- compiler: gcc
compiler-version: 14
name: "${{ github.job }} (${{ matrix.compiler }}-${{ matrix.compiler-version }})"
runs-on: ubuntu-24.04
container: node:20-bookworm-slim
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -71,11 +61,9 @@ jobs:
$CXX --version
cmake -S . -B build -G Ninja -DCMAKE_CXX_STANDARD=20 -DSQLGEN_BUILD_TESTS=ON -DSQLGEN_SQLITE3=OFF
cmake --build build
- name: Launch postgres
run: |
sudo systemctl start postgresql.service
- name: Run tests
run: |
ctest --test-dir build --output-on-failure
env:
# The hostname used to communicate with the PostgreSQL service container
POSTGRES_HOST: postgres
# The default PostgreSQL port
POSTGRES_PORT: 5432