name: core

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
jobs:
  build:
    strategy:
      matrix:
          python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0"]
          include:
            - python-version: 3.7
              os: ubuntu-22.04
    runs-on: ${{ matrix.os || 'ubuntu-latest' }}

    steps:
    - uses: actions/checkout@v3
    - name: Setup Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install setuptools
        pip install pytest
    - name: Setup
      run: |
        python setup.py install
    - name: Testing sequential
      run: |
        pytest


  build-27:
    runs-on: ubuntu-22.04
    container:
      image: python:2.7.18-buster
    env:
      py27: 2.7
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pytest
      - name: Setup
        run: |
          python setup.py install
      - name: Testing sequential
        run: |
          pytest

  build-36:
    runs-on: ubuntu-22.04
    container:
      image: python:3.6.9-buster
    env:
      py36: 3.6
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install pytest
      - name: Setup
        run: |
          python setup.py install
      - name: Testing sequential
        run: |
          pytest
