name: Tests
on: [push, pull_request]
jobs:
  Coverage:
    name: Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Packages
        run: |
          sudo apt-get update
          sudo apt-get install libbsd-dev
      - name: Configure
        run: |
          cmake -S . -B ${{github.workspace}}/tmp -DCOVERAGE=ON -DWALL=ON
      - name: Build
        run: |
          cmake --build ${{github.workspace}}/tmp --target all test
      - name: Coverage
        run: |
          bash <(curl -s https://codecov.io/bash)
  All-Tests-macOS:
    name: All Tests (macOS)
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - name: Packages
        run: |
          brew update
          brew install ncurses
      - name: Configure
        run: |
          cmake -S . -B ${{github.workspace}}/tmp -DHOMEBREW_NCURSES=ON -DWALL=ON
      - name: Build
        run: |
          cmake --build ${{github.workspace}}/tmp --target all test

name: Tests
on: [push, pull_request]
jobs:
  Coverage:
    name: Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Packages
        run: |
          sudo apt-get update
          sudo apt-get install libbsd-dev
      - name: Configure
        run: |
          cmake -S . -B ${{github.workspace}}/tmp -DCOVERAGE=ON -DWALL=ON
      - name: Build
        run: |
          cmake --build ${{github.workspace}}/tmp --target all test
      - name: Coverage
        run: |
          bash <(curl -s https://codecov.io/bash)
  All-Tests-macOS:
    name: All Tests (macOS)
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - name: Packages
        run: |
          brew update
          brew install ncurses
      - name: Configure
        run: |
          cmake -S . -B ${{github.workspace}}/tmp -DHOMEBREW_NCURSES=ON -DHOMEBREW_NCURSES_PATH="/usr/local/opt/ncurses" -DWALL=ON
      - name: Build
        run: |
          cmake --build ${{github.workspace}}/tmp --target all test

Add `-DHOMEBREW_NCURSES_PATH` option for macOS GitHub Action.
Add `-DHOMEBREW_NCURSES_PATH` option for macOS GitHub Action.

The Homebrew directory on the GitHub Actions Macs is located at
"/usr/local/opt/ncurses" instead of the default
"/opt/homebrew/opt/ncurses" from the `CMakeLists.txt` file.
