version: 2.1

workflows:
  workflow:
    jobs:
      - test:
          matrix:
            parameters:
              python_version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
      - test_pypy:
          matrix:
            parameters:
              python_version: ["2.7", "3.7"]
      - lint-rst

jobs:
  test:
    parameters:
      python_version:
        type: string
    steps:
      - checkout
      - run:
          name: Test
          command: python setup.py test
    docker:
      - image: circleci/python:<<parameters.python_version>>

  test_pypy:
    parameters:
      python_version:
        type: string
    steps:
      - checkout
      - run:
          name: Test
          command: pypy setup.py test
    docker:
      - image: pypy:<<parameters.python_version>>

  lint-rst:
    working_directory: ~/code
    steps:
      - checkout
      - run:
          name: Install lint tools
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install Pygments restructuredtext-lint
      - run:
          name: Lint
          command: |
            . venv/bin/activate
            rst-lint --encoding=utf-8 README.rst
    docker:
      - image: circleci/python:3.10

version: 2.1

workflows:
  workflow:
    jobs:
      - test:
          matrix:
            parameters:
              python_version: ["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
      - test_pypy:
          matrix:
            parameters:
              python_version: ["2.7", "3.7", "3.8"]
      - lint-rst

jobs:
  test:
    parameters:
      python_version:
        type: string
    steps:
      - checkout
      - run:
          name: Test
          command: python setup.py test
    docker:
      - image: circleci/python:<<parameters.python_version>>

  test_pypy:
    parameters:
      python_version:
        type: string
    steps:
      - checkout
      - run:
          name: Test
          command: pypy setup.py test
    docker:
      - image: pypy:<<parameters.python_version>>

  lint-rst:
    working_directory: ~/code
    steps:
      - checkout
      - run:
          name: Install lint tools
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install Pygments restructuredtext-lint
      - run:
          name: Lint
          command: |
            . venv/bin/activate
            rst-lint --encoding=utf-8 README.rst
    docker:
      - image: circleci/python:3.10

Add PyPy 3.8 to the CI tests
Add PyPy 3.8 to the CI tests
