name: test

on:
  push:
    paths-ignore:
      - '*.md'
      - 'COPYING'
      - 'HISTORY'
  pull_request:
    paths-ignore:
      - '*.md'
      - 'COPYING'
      - 'HISTORY'

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        emacs_version:
          - "26.3"
          - "27.2"
          - "28.2"
          - "29.4"
          - "30.2"
          - snapshot
    steps:
      - name: Set up Emacs
        uses: purcell/setup-emacs@master
        with:
          version: ${{matrix.emacs_version}}

      - name: Check out tuareg
        uses: actions/checkout@v5

      - name: Byte-compile
        run: make elc-werror

      - name: Test
        run: make check
