name: Python package

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      # You can use PyPy versions in python-version.
      # For example, pypy-2.7 and pypy-3.8
      matrix:
        python-version: ["2.7", "3.7", "3.8", "3.9"]

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - name: Display Python version
        run: python -c "import sys; print(sys.version)"

      - name: Upgrade pip and friends
        if: ${{ matrix.python-version != '2.7' }}
        run: python -m pip install --upgrade pip setuptools

      - name: Install dependencies
        run: pip install --disable-pip-version-check wheel flake8 build pytest

      - name: Lint with flake8
        run: |
          # stop the build if there are Python syntax errors or undefined names
          flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
          # exit-zero treats all errors as warnings
          flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics

      - name: Build package
        run: python -m build

      - name: Install package
        run: pip install --disable-pip-version-check dist/json_store-*.whl

      - name: Test with pytest
        run: pytest

name: Python package

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      # You can use PyPy versions in python-version.
      # For example, pypy-2.7 and pypy-3.8
      matrix:
        python-version: ["2.7", "3.7", "3.8", "3.9", "3.10"]

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - name: Display Python version
        run: python -c "import sys; print(sys.version)"

      - name: Upgrade pip and friends
        if: ${{ matrix.python-version != '2.7' }}
        run: python -m pip install --upgrade pip setuptools

      - name: Install dependencies
        run: pip install --disable-pip-version-check wheel flake8 build pytest

      - name: Lint with flake8
        run: |
          # stop the build if there are Python syntax errors or undefined names
          flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
          # exit-zero treats all errors as warnings
          flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics

      - name: Build package
        run: python -m build

      - name: Install package
        run: pip install --disable-pip-version-check dist/json_store-*.whl

      - name: Test with pytest
        run: pytest

Add Python 3.10 to test matrix
Add Python 3.10 to test matrix
