Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ orbs:
executors:
python310:
docker:
- image: python:3.10.19
- image: python:3.10.20
resource_class: small

python311:
docker:
- image: python:3.11.14
- image: python:3.11.15
resource_class: small

python312:
docker:
- image: python:3.12.12
- image: python:3.12.13
resource_class: small

python-integration:
docker:
- image: python:3.12.12
- image: python:3.12.13
environment:
GOOGLE_APPLICATION_CREDENTIALS: /key.json
resource_class: small
Comment on lines 18 to 28
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The python312 and python-integration executors share the same docker image and resource class, leading to duplication. When this version is updated, it needs to be changed in two places. You can use YAML anchors to define this configuration once and reuse it, which will make future updates easier.

  python312: &python312_executor
    docker:
      - image: python:3.12.13
    resource_class: small

  python-integration:
    <<: *python312_executor
    environment:
      GOOGLE_APPLICATION_CREDENTIALS: /key.json
References
  1. To improve maintainability, avoid duplicating code or configuration. The 'Don't Repeat Yourself' (DRY) principle suggests that duplication should be eliminated by abstracting out the common parts.

Expand Down