uktrade/directory-api-client

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
version: 2
jobs:
  test:
    docker:
      - image: cimg/python:3.9
    steps:
      - checkout
      - run:
          command: |
            python3 -m venv .venv
            . .venv/bin/activate
            pip install --upgrade pip
            make test_requirements
            make pytest_codecov -- --codecov-token=${CODECOV_TOKEN}

  flake8:
    docker:
      - image: cimg/python:3.9
    steps:
      - checkout
      - run:
          command: |
            python3 -m venv venv
            . venv/bin/activate
            pip install flake8
            flake8
  black:
    docker:
      - image: cimg/python:3.9
    steps:
      - checkout
      - run:
          name: Run Black in check mode
          command: |
            python3 -m venv .venv
            . .venv/bin/activate
            pip install black
            black ./ --check

  publish_to_pypi:
    docker:
      - image: cimg/python:3.9
    steps:
      - checkout
      - run:
          command: |
            python3 -m venv .venv
            . .venv/bin/activate
            pip install --upgrade pip
            make test_requirements
            make publish

workflows:
  version: 2
  test_and_publish_to_pypi:
    jobs:
      - flake8
      - black
      - test
      - publish_to_pypi:
          requires:
            - test
            - flake8
            - black
          filters:
            branches:
              only: master