Skip to content

feat: PostgreSQL Event Store Implementation #251

feat: PostgreSQL Event Store Implementation

feat: PostgreSQL Event Store Implementation #251

Workflow file for this run

name: "Test"
on:
pull_request:
branches:
- main
paths:
- "core/**"
- "cli/**"
- "nix/**"
push:
branches:
- main
paths:
- "core/**"
- "cli/**"
- "nix/**"
jobs:
tests-linux:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: neohaskell
POSTGRES_PASSWORD: neohaskell
POSTGRES_DB: neohaskell
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U neohaskell"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v5
- uses: DeterminateSystems/determinate-nix-action@v3.12.2
with:
extra-conf: |
extra-substituters = https://cache.iog.io
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- uses: DeterminateSystems/magic-nix-cache-action@v13
# - name: Build the project with Nix
# run: nix build
- name: Build the project with cabal
run: nix develop --command cabal build all
- name: Run core tests
run: nix develop --command cabal test core
# Doctests are failing - See issue #204
# - name: Run core doctests
# run: nix-shell --run "cabal repl --with-compiler=doctest --repl-options=--verbose core"
- name: Run CLI tests
run: nix develop --command cabal test cli
tests-macos:
runs-on: macos-latest
steps:
- name: Install current Bash on macOS
run: brew install bash
- name: Start PostgreSQL on macOS
run: |
brew install postgresql@16
brew services start postgresql@16
# Wait for PostgreSQL to start
for i in {1..30}; do
if pg_isready -h localhost > /dev/null 2>&1; then
break
fi
echo "Waiting for PostgreSQL to start..."
sleep 1
done
# Create user and database
createuser -s neohaskell || true
psql -U $(whoami) -c "ALTER USER neohaskell WITH PASSWORD 'neohaskell';" || true
createdb -U neohaskell neohaskell || true
- uses: actions/checkout@v5
- uses: DeterminateSystems/determinate-nix-action@v3.12.2
with:
extra-conf: |
extra-substituters = https://cache.iog.io
extra-trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
- uses: DeterminateSystems/magic-nix-cache-action@v13
# - name: Build the project with Nix
# run: nix build
- name: Build the project with cabal
run: nix develop --command cabal build all
- name: Run core tests
run: nix develop --command cabal test core
# Doctests are failing - See issue #204
# - name: Run core doctests
# run: nix-shell --run "cabal repl --with-compiler=doctest --repl-options=--verbose core"
- name: Run CLI tests
run: nix develop --command cabal test cli