version: 2.1

orbs:
  python: circleci/python@2.0.3
  ship: auth0/ship@dev:alpha

executors:
  python_3_10:
    docker:
      - image: cimg/python:3.10
  python_2_7:
    docker:
      - image: cimg/python:2.7

jobs:
  python_3:
    executor: python_3_10
    steps:
      - checkout
      - python/install-packages:
          pkg-manager: pip
      - run: pre-commit run --all-files
      - run: coverage run -m unittest
      - run: bash <(curl -s https://codecov.io/bash)
      - run: make -C docs html

  python_2:
    executor: python_2_7
    steps:
      - checkout
      - python/install-packages:
          pkg-manager: pip-dist
          path-args: ".[test]"
      - run: coverage run -m unittest discover -s auth0/v3/test -t .
      - run: bash <(curl -s https://codecov.io/bash)

workflows:
  main:
    jobs:
      - python_3
      - python_2
      - ship/python-publish:
          prefix-tag: false
          context:
            - publish-pypi
            - publish-gh
          filters:
            branches:
              only:
                - master
          requires:
            - python_3
            - python_2


version: 2.1

orbs:
  python: circleci/python@2.0.3
  ship: auth0/ship@dev:35c43dd

executors:
  python_3_10:
    docker:
      - image: cimg/python:3.10
  python_2_7:
    docker:
      - image: cimg/python:2.7

jobs:
  python_3:
    executor: python_3_10
    steps:
      - checkout
      - python/install-packages:
          pkg-manager: pip
      - run: pre-commit run --all-files
      - run: coverage run -m unittest
      - run: bash <(curl -s https://codecov.io/bash)
      - run: make -C docs html

  python_2:
    executor: python_2_7
    steps:
      - checkout
      - python/install-packages:
          pkg-manager: pip-dist
          path-args: ".[test]"
      - run: coverage run -m unittest discover -s auth0/v3/test -t .
      - run: bash <(curl -s https://codecov.io/bash)

workflows:
  main:
    jobs:
      - python_3
      - python_2
      - ship/python-publish:
          prefix-tag: false
          context:
            - publish-pypi
            - publish-gh
          filters:
            branches:
              only:
                - master
          requires:
            - python_3
            - python_2


Use specific build for Python releasing
Use specific build for Python releasing
