version: 2

defaults: &defaults
  docker:
    - image: circleci/python:3.7

jobs:

  test:
    <<: *defaults
    steps:
      - checkout
      - run:
          name: Installing pipenv
          command: |
            pip install --user pipenv
            echo 'export PATH=$PATH:$HOME/.local/bin' >> $BASH_ENV
      - run:
          name: Installing all dependencies (including dev ones)
          command: pipenv install --dev
      - run:
          name: Running tests
          command: |
            pipenv run pytest --cov-report html --cov=tukio tests/
      - store_artifacts:
          path: htmlcov

  deploy:
    <<: *defaults
    steps:
      - checkout
      - run:
          name: Installing Pipenv & Twine
          command: |
            pip install --user twine pipenv
            echo 'export PATH=$PATH:$HOME/.local/bin' >> $BASH_ENV
      - run:
          name: Deploying to Pypi
          command: ./deploy_to_pypi.sh $CIRCLE_TAG
      - store_artifacts:
          path: dist

workflows:
  version: 2
  build-test-deploy:
    jobs:

      - test:
          filters:
            tags:
              only: /.*/

      - deploy:
          context: pypi-creds
          requires:
            - test
          filters:
            branches:
              ignore: /.*/
            tags:
              only: /[0-9]+(\.[0-9]+){2}/

version: 2

defaults: &defaults
  docker:
    - image: circleci/python:3.9

jobs:

  test:
    <<: *defaults
    steps:
      - checkout
      - run:
          name: Installing pipenv
          command: |
            pip install --user pipenv
            echo 'export PATH=$PATH:$HOME/.local/bin' >> $BASH_ENV
      - run:
          name: Installing all dependencies (including dev ones)
          command: pipenv install --dev
      - run:
          name: Running tests
          command: |
            pipenv run pytest --cov-report html --cov=tukio tests/
      - store_artifacts:
          path: htmlcov

  deploy:
    <<: *defaults
    steps:
      - checkout
      - run:
          name: Installing Pipenv & Twine
          command: |
            pip install --user twine pipenv
            echo 'export PATH=$PATH:$HOME/.local/bin' >> $BASH_ENV
      - run:
          name: Deploying to Pypi
          command: ./deploy_to_pypi.sh $CIRCLE_TAG
      - store_artifacts:
          path: dist

workflows:
  version: 2
  build-test-deploy:
    jobs:

      - test:
          filters:
            tags:
              only: /.*/

      - deploy:
          context: pypi-creds
          requires:
            - test
          filters:
            branches:
              ignore: /.*/
            tags:
              only: /[0-9]+(\.[0-9]+){2}/

Use python 3.9 in circle ci
Use python 3.9 in circle ci
