name: Run tests

on:
  push:
    branches-ignore: [ sync, stable ]
    paths: [ 'colors/**', 'lua/**', 'tests/**' ]
  pull_request:
    branches-ignore: [ sync, stable ]
    paths: [ 'colors/**', 'lua/**', 'tests/**' ]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.actor }}
  cancel-in-progress: true

jobs:
  build:
    name: Run tests
    timeout-minutes: 10
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        neovim_version: ['v0.8.3', 'v0.9.5', 'v0.10.0', 'nightly']
        # include:
        # - os: macos-latest
        #   neovim_version: v0.10.0
        # - os: windows-latest
        #   neovim_version: v0.10.0
    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4
      - name: Setup neovim
        uses: rhysd/action-setup-vim@v1
        with:
          neovim: true
          version: ${{ matrix.neovim_version }}
      - name: Run tests
        run: make test
