shared_configs:
  simple_job_steps: &simple_job_steps
    - checkout
    - run:
        name: Run tests
        command: |
          make test

# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
jobs:
  build-1-22:
    working_directory: ~/repo
    docker:
      - image: cimg/go:1.22
    steps: *simple_job_steps

  build-1-23:
    working_directory: ~/repo
    docker:
      - image: cimg/go:1.23
    steps: *simple_job_steps

  build-1-24:
    working_directory: ~/repo
    docker:
      - image: cimg/go:1.24
    steps: *simple_job_steps

  build-1-25:
    working_directory: ~/repo
    docker:
      - image: cimg/go:1.25
    steps:
      - checkout
      - run:
          name: Run tests and linters
          command: |
            make ci

workflows:
  pr-build-test:
    jobs:
      - build-1-22
      - build-1-23
      - build-1-24
      - build-1-25
