version: 2.1

executors:
  jdk8:
    docker:
    - image: clojure:openjdk-8-lein
  jdk11:
    docker:
    - image: clojure:openjdk-11-lein
  jdk14:
    docker:
    - image: clojure:openjdk-14-lein
  jdk15:
    docker:
    - image: clojure:openjdk-15-lein

jobs:
  postal:
    parallelism: 4
    parameters:
      jdk:
        type: executor
    executor: << parameters.jdk >>
    steps:
      - add_ssh_keys:
          fingerprints:
            - "a6:08:d9:a8:b8:92:c3:d2:19:f4:0b:af:a6:8b:2b:7c"
      - checkout
      - restore_cache:
          key: cache-{{ checksum "project.clj" }}
      - run: lein test-all
      - save_cache:
          paths:
            - $HOME/.m2
            - $HOME/.lein
          key: cache-{{ checksum "project.clj" }}

workflows:
  all-tests:
    jobs:
      - postal:
          matrix:
            parameters:
              jdk: [jdk8, jdk11, jdk14, jdk15]
              

version: 2.1

executors:
  jdk8:
    docker:
    - image: clojure:openjdk-8-lein
  jdk11:
    docker:
    - image: clojure:openjdk-11-lein
  jdk14:
    docker:
    - image: clojure:openjdk-14-lein
  jdk15:
    docker:
    - image: clojure:openjdk-15-lein
  jdk16:
    docker:
    - image: clojure:openjdk-16-lein

jobs:
  postal:
    parallelism: 4
    parameters:
      jdk:
        type: executor
    executor: << parameters.jdk >>
    steps:
      - add_ssh_keys:
          fingerprints:
            - "a6:08:d9:a8:b8:92:c3:d2:19:f4:0b:af:a6:8b:2b:7c"
      - checkout
      - restore_cache:
          key: cache-{{ checksum "project.clj" }}
      - run: lein test-all
      - save_cache:
          paths:
            - $HOME/.m2
            - $HOME/.lein
          key: cache-{{ checksum "project.clj" }}

workflows:
  all-tests:
    jobs:
      - postal:
          matrix:
            parameters:
              jdk: [jdk8, jdk11, jdk14, jdk15, jdk16]
              

Add jdk16 to CI, weeeee!
Add jdk16 to CI, weeeee!
