# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.9.7@sha256:5f1a4be3e34c9d93079e9d955a0240bd18777ce90dce70c99f6728a6c055bfc6
    working_directory: ~/repo

    steps:
      - checkout

      - restore_cache:
          keys:
            - cache-{{ checksum "Pipfile.lock" }}
            - cache-
      - run:
          name: Install dependencies
          command: |
            python3 -m venv .venv
            pip install --user pipenv
            pipenv sync --dev

      - save_cache:
          key: cache-{{ checksum "Pipfile.lock" }}
          paths:
            - ~/.local
            - ~/.cache

      - run:
          name: run tests
          command: |
            pipenv run flake8 bamboo_crawler tests
            export AWS_ACCESS_KEY_ID='1234'
            export AWS_SECRET_ACCESS_KEY='5678'
            pipenv run python setup.py test
            pipenv run python setup.py sdist bdist_wheel
            pipenv run twine check dist/*

      - store_artifacts:
          path: test-reports
          destination: test-reports

# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.10.0@sha256:9534e2d449e67b4c96f4e644d556ace15980eb9194b1de4aa67d06897f5673af
    working_directory: ~/repo

    steps:
      - checkout

      - restore_cache:
          keys:
            - cache-{{ checksum "Pipfile.lock" }}
            - cache-
      - run:
          name: Install dependencies
          command: |
            python3 -m venv .venv
            pip install --user pipenv
            pipenv sync --dev

      - save_cache:
          key: cache-{{ checksum "Pipfile.lock" }}
          paths:
            - ~/.local
            - ~/.cache

      - run:
          name: run tests
          command: |
            pipenv run flake8 bamboo_crawler tests
            export AWS_ACCESS_KEY_ID='1234'
            export AWS_SECRET_ACCESS_KEY='5678'
            pipenv run python setup.py test
            pipenv run python setup.py sdist bdist_wheel
            pipenv run twine check dist/*

      - store_artifacts:
          path: test-reports
          destination: test-reports

Update circleci/python Docker tag to v3.10.0
Update circleci/python Docker tag to v3.10.0
