version: 2.0
jobs:
  build:
    docker:
      - image: clojure:lein-2.8.1
        environment:
          - DB_PORT: 5432
          - CLOJARS_ENVIRONMENT: test
      - image: postgres:12.1
        environment:
          - POSTGRES_USER=clojars
          - POSTGRES_PASSWORD=clojars
          - POSTGRES_DB=clojars
    working_directory: ~/clojars
    steps:
      - checkout
      - restore_cache:
          keys:
            - clojars-{{ checksum "project.clj" }}
      - run: lein deps
      - save_cache:
          paths:
            - $HOME/.m2
            - $HOME/.lein
          key: clojars-{{ checksum "project.clj" }}
      - run: lein do run -m user/migrate, test, uberjar
      - store_test_results:
          path: target/test-results
      - run: mv target/uberjar/clojars-web-*-standalone.jar clojars-uberjar.jar
      - store_artifacts:
          path: clojars-uberjar.jar
          destination: uberjar

version: 2.0
jobs:
  build:
    docker:
      - image: clojure:lein-2.8.1
        environment:
          - DB_PORT: 5432
          - CLOJARS_ENVIRONMENT: test
      - image: postgres:12.1
        environment:
          - POSTGRES_USER=clojars
          - POSTGRES_PASSWORD=clojars
          - POSTGRES_DB=clojars
    working_directory: ~/clojars
    steps:
      - checkout
      - restore_cache:
          keys:
            - clojars-{{ checksum "project.clj" }}
      - run: lein deps
      - save_cache:
          paths:
            - $HOME/.m2
            - $HOME/.lein
          key: clojars-{{ checksum "project.clj" }}
      - run: lein do run -m user/migrate, test, uberjar
      - run: ./bin/clj-kondo --lint src test
      - store_test_results:
          path: target/test-results
      - run: mv target/uberjar/clojars-web-*-standalone.jar clojars-uberjar.jar
      - store_artifacts:
          path: clojars-uberjar.jar
          destination: uberjar

Add clj-kondo linting to CI build
Add clj-kondo linting to CI build
