version: 2.1

jobs:
  test:
    docker:
      - image: cimg/python:3.11-node
    steps:
      - checkout

      - run:
          name: Install Poetry
          command: |
            pip install --upgrade pip
            pip install poetry

      - run:
          name: Configure Poetry
          command: |
            poetry --version
            poetry config virtualenvs.in-project true

      - run:
          name: Install dependencies (Poetry)
          command: |
            poetry install --no-interaction

      - run:
          name: Run tests
          command: |
            poetry run python -m unittest discover -s tests

workflows:
  version: 2
  test:
    jobs:
      - test
