name: ci
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

concurrency:
  group: ci-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
  cancel-in-progress: true

jobs:
  test:

    runs-on: ${{ matrix.os || 'ubuntu-latest' }}
    strategy:
      fail-fast: false
      matrix:
        python:
          - "3.8"
          - "3.12"
          - "3.x"
        include:
          - os: ubuntu-22.04
            python: "3.7"

    steps:
      - uses: actions/checkout@v4
      - name: setup
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python }}
      - name: install
        run: |
          python -m pip install --upgrade pip
          pip install -e .
      - name: test
        run: |
          pip install ."[dev]"
          pytest
