name: test on macOS

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  test:
    runs-on: macos-latest
    steps:
      - name: checkout
        uses: actions/checkout@v1
        with:
          fetch-depth: 1

      - run: brew install autoconf automake libtool

      # FIXME: test on macOS
      #- name: test completion
      #  run: cd test && zsh -f runtests.zsh fzftab.ztst

      - name: build binary module
        run: zsh -fc 'source ./fzf-tab.zsh && build-fzf-tab-module'

      #- name: test binary module
      #  run: cd test && zsh -f runtests.zsh fzftab.ztst
