vendredi 15 avril 2016

Running InMemory database tests on CircleCi using play framework

I have a play framework for which I am trying to setup circleCI. In all my test cases, which requires database interactions, I am using InMemoryDatabase. All the tests run perfectly on local machine. But on circleCi, they fail with the following error:

play.api.Configuration$$anon$1: Configuration error[Cannot connect to database [default]]

My circle.yml file looks like as follow:

machine:
  timezone: Asia/Kolkata
java:
  version: oraclejdk8
services:
  - redis
environment:
   DATABASE_URL: postgres://ubuntu:@127.0.0.1:5432/circle_test
general:
  artifacts:
    - target/universal
test:
  override:
   - "cd ProjectPath; ProjectPath/bin/activator clean compile test"
post:
  - mkdir -p $CIRCLE_TEST_REPORTS/junit/
  - find . -type f -regex ".*/target/test-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;

Aucun commentaire:

Enregistrer un commentaire