Skip to content

persistent-2.15.6.0 #1087

persistent-2.15.6.0

persistent-2.15.6.0 #1087

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
build:
services:
postgres:
image: postgres:12-alpine
env:
POSTGRES_USER: perstest
POSTGRES_PASSWORD: perstest
POSTGRES_DB: persistent
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# mysql-service Label used to access the service container
mysql-service:
# Docker Hub image (also with version)
image: mysql:8.0
env:
## Accessing to Github secrets, where you can store your configuration
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_ROOT_PASSWORD: test
MYSQL_DATABASE: test
## map the "external" 33306 port with the "internal" 3306
ports:
- 33306:3306
# Set health checks to wait until mysql database has started (it takes some seconds to start)
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
runs-on: ubuntu-latest
strategy:
matrix:
cabal: ["3.6"]
ghc:
- "8.4.4"
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"
- "9.2.4"
- "9.4.1"
env:
CONFIG: "--enable-tests --enable-benchmarks"
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Check MySQL connection
run: mysql -utest -ptest -h127.0.0.1 --port=33306 test -e "SELECT 1;"
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: '5.0'
- name: Start Redis
uses: supercharge/redis-github-action@1.4.0
- run: cabal v2-update
- run: cabal v2-freeze $CONFIG
- run: cat cabal.project.freeze
- uses: actions/cache@v3
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
${{ runner.os }}-${{ matrix.ghc }}-
- run: cabal v2-build all --disable-optimization --only-dependencies $CONFIG
- run: cabal v2-build all --disable-optimization $CONFIG
- run: cabal v2-test all --disable-optimization $CONFIG --test-options "--fail-on-focus"
- run: cabal v2-bench all --disable-optimization $CONFIG
- run: cabal v2-haddock all $CONFIG
continue-on-error: true
- run: cabal v2-sdist all