version: 2.1

workflows:
  build-and-test:
    jobs:
      - build:
          context: dockerauth

jobs:
  build:
    docker:
      - image: cimg/python:3.10
        auth:
          username: $DOCKERHUB_USERNAME
          password: $DOCKERHUB_PASSWORD
    resource_class: small
    steps:
      - checkout
      - run: python -m pip install -r requirements.txt
      - run: python -m pytest
