haskell-gha-1.0: tests/golden/config/haskell-gha.conf.yaml
name: Postgres CI
cabal-version: 3.18.1.0
runs-on: ubuntu-24.04
timeout-minutes: 90
branches: [master, 'release/**']
submodules: recursive
# The oldest and the newest supported Postgres.
matrix:
postgres: ['15', '18']
exclude:
- ghc: '9.10'
postgres: '15'
# The workflow does not copy this key, so it drops this comment.
apt: [libpq-dev, postgresql-client]
# The services of each build job.
services:
# The database for the tests.
postgres:
image: postgres:${{ matrix.postgres }}
env:
POSTGRES_PASSWORD: postgres # Only for CI.
ports: ['5432:5432']
# The runner starts the steps when the database accepts connections.
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-retries 10
# The test reporter writes check runs.
permissions:
contents: read
# For the annotations of the test results.
checks: write
# The steps for Postgres.
hooks:
after-setup:
- name: Show the Postgres version
run: psql --version
# Postgres is ready for the build.
after-build:
# A check that the build made the programs.
- name: Show the executables
run: cabal list-bin all
# The package checks come next.
ghc-options: -Werror -Wno-unused-imports
cabal-project-local: |
package config
flags: +postgres
constraints: postgresql-libpq >= 0.10
cabal-jobs: 2
tests: false
benchmarks: false
dependencies: both
fourmolu:
version: '0.19.0.1'
patterns:
- 'src/**/*.hs'
- '!src/Generated.hs'
runs-on:
group: small
labels: [self-hosted, linux]
hlint:
version: '3.8'
fail-on: error
paths: [src, test]
# HLint needs no large runner.
runs-on: ubuntu-slim
actions:
checkout: v6
cache: runs-on/cache@v4
run-fourmolu: v12
hlint-setup: v2
hlint-run: v2