circleci

rm -rf /home/circleci/.gitconfig
slipset 2021-01-01T14:11:42.061600Z

Trying to get a postgres (with jdbc.next) app building on circle. Got this:

docker:
      - image: circleci/clojure:openjdk-11-lein-2.8.1
      - image: circleci/postgres:13.1
        environment:
          POSTGRES_HOST_AUTH_METHOD: trust
          POSTGRES_USER: root
          POSTGRES_DB: circle-test_test
So the first line in the environment: is working, since I’m now able to start up the postgres image, but the two next ones don’t seem to have an impact. In my get-datasource call, I have
(jdbc/get-datasource {:dbtype "postgresql" :dbname "circle-test_test" :user "root"})
but circle still doesn’t let me connect.

borkdude 2021-01-01T14:12:39.061800Z

@slipset do you use this for testing?

slipset 2021-01-01T14:13:06.062100Z

yes

slipset 2021-01-01T14:13:40.062700Z

I’m looking into migrating to postgres, and I want our tests to run on circle.

slipset 2021-01-01T14:13:54.062900Z

Hay, that seems to have worked!

borkdude 2021-01-01T14:14:18.063300Z

@slipset fwiw, there's also nice testing libs for that without having to install pg: https://github.com/seancorfield/next-jdbc/blob/develop/deps.edn#L23-L25

slipset 2021-01-01T14:14:52.063800Z

Thanks! I’ll have a look into that.

borkdude 2021-01-01T14:15:32.064100Z

The #sql channel is usually also helpful here

seancorfield 2021-01-01T17:56:33.064600Z

Re: embedded PG -- I was amazed at how well that works!