name: Haskell CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    strategy:
      matrix:
        ghc: ['8.0.2', '8.2.2', '8.4.1', '8.6.3', '8.8.2', '8.10.1']
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-haskell@v1
      with:
        ghc-version: ${{ matrix.ghc }}
        cabal-version: '3.2'
    - uses: harmon758/postgresql-action@v1
      with:
        postgresql version: '11'
        postgresql db: 'test'
        postgresql user: 'postgres'
        postgresql password: 'password'

    - name: Cache
      uses: actions/cache@v1
      env:
        cache-name: cache-cabal
      with:
        path: ~/.cabal
        key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
        restore-keys: |
          ${{ runner.os }}-build-${{ env.cache-name }}-
          ${{ runner.os }}-build-
          ${{ runner.os }}-

    - name: Install dependencies
      run: |
        cabal v2-update
        cabal v2-build --only-dependencies --enable-tests --enable-benchmarks
    - name: Run checks
      run: |
        cp ./README.md ./selda/README.md
        make license
        cabal v2-run selda-changelog md
        make check

name: Haskell CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    strategy:
      matrix:
        ghc: ['8.4.1', '8.6.3', '8.8.2', '8.10.1']
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-haskell@v1
      with:
        ghc-version: ${{ matrix.ghc }}
        cabal-version: '3.2'
    - uses: harmon758/postgresql-action@v1
      with:
        postgresql version: '11'
        postgresql db: 'test'
        postgresql user: 'postgres'
        postgresql password: 'password'

    - name: Cache
      uses: actions/cache@v1
      env:
        cache-name: cache-cabal
      with:
        path: ~/.cabal
        key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
        restore-keys: |
          ${{ runner.os }}-build-${{ env.cache-name }}-
          ${{ runner.os }}-build-
          ${{ runner.os }}-

    - name: Install dependencies
      run: |
        cabal v2-update
        cabal v2-build --only-dependencies --enable-tests --enable-benchmarks
    - name: Run checks
      run: |
        cp ./README.md ./selda/README.md
        make license
        cabal v2-run selda-changelog md
        make check

Drop support for GHC older than 8.4.
Drop support for GHC older than 8.4.