# * test.yml --- Test Emacs packages using makem.sh on GitHub Actions

# https://github.com/alphapapa/makem.sh

# Based on Steve Purcell's examples at
# <https://github.com/purcell/setup-emacs/blob/master/.github/workflows/test.yml>,
# <https://github.com/purcell/package-lint/blob/master/.github/workflows/test.yml>.

# * License:

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

# * Code:

name: "CI"
on:
  pull_request:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        emacs_version:
          - 27.1
          - snapshot
    steps:
      - uses: purcell/setup-emacs@master
        with:
          version: ${{ matrix.emacs_version }}

      - uses: actions/checkout@v2

      - name: Install Eldev
        run: curl -fsSL https://raw.github.com/org-roam/org-roam/master/github-eldev | sh

      - name: Install dependencies
        run: make prepare

      - name: Lint
        run: make lint

      - name: Test
        run: make test
# Local Variables:
# eval: (outline-minor-mode)
# End:
