name: Stack

on:
    pull_request:
    push:
      branches:
      - master

jobs:
  build:
    name: CI
    runs-on: ${{ matrix.os }}
    env:
      STACK_ROOT: ${{ github.workspace }}/.stack
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest,
          # windows-latest # TODO add windows support
        ]
        resolver: [nightly, lts-18, lts-17, lts-16]
        # Bugs in GHC make it crash too often to be worth running
        exclude:
          - os: windows-latest
            resolver: nightly
          - os: windows-latest
            resolver: lts-16
    steps:
      - name: Clone project
        uses: actions/checkout@v2
        with:
          submodules: 'true'

      - name: Cache dependencies
        uses: actions/cache@v2
        with:
          path: |
            ~/.stack
            ${{ github.workspace }}/.stack
          key: ${{ runner.os }}-${{ matrix.resolver }}-haskell-${{ hashFiles('stack.yaml') }}
          restore-keys: |
            ${{ runner.os }}-${{ matrix.resolver }}-haskell-

      - name: Build and run tests
        shell: bash
        run: |
            set -ex
            curl -sSL https://get.haskellstack.org/ | sh -s - -f
            stack test --fast --no-terminal --resolver=${{ matrix.resolver }}

name: Stack

on:
    pull_request:
    push:
      branches:
      - master

jobs:
  build:
    name: CI
    runs-on: ${{ matrix.os }}
    env:
      STACK_ROOT: ${{ github.workspace }}/.stack
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest,
          # windows-latest # TODO add windows support
        ]
        resolver: [nightly, lts-18, lts-17, lts-16]
        # Bugs in GHC make it crash too often to be worth running
        exclude:
          - os: macos-latest # no Cocoa ?? https://github.com/snoyberg/keter/runs/4103876510?check_suite_focus=true
            resolver: lts-16
    steps:
      - name: Clone project
        uses: actions/checkout@v2
        with:
          submodules: 'true'

      - name: Cache dependencies
        uses: actions/cache@v2
        with:
          path: |
            ~/.stack
            ${{ github.workspace }}/.stack
          key: ${{ runner.os }}-${{ matrix.resolver }}-haskell-${{ hashFiles('stack.yaml') }}
          restore-keys: |
            ${{ runner.os }}-${{ matrix.resolver }}-haskell-

      - name: Build and run tests
        shell: bash
        run: |
            set -ex
            curl -sSL https://get.haskellstack.org/ | sh -s - -f
            stack test --fast --no-terminal --resolver=${{ matrix.resolver }}

Drop support for lts-16 for osx
Drop support for lts-16 for osx

doesn't work for some reason.
Again if someone can make this work send a PR.
