box: ruby:2.4.0

services:
  - postgres

build:
  steps:
    - bigtruedata/install-node:
      version: 7.5.0

    - script:
        name: Install dependencies
        code: |
          sudo apt-get update
          sudo apt-get install -y graphviz

    - npm-install

    - bundle-install

    - rails-database-yml:
      service: postgresql-docker

    - script:
        name: Echo ruby information
        code: |
          echo "ruby version $(ruby --version) running"
          echo "from location $(which ruby)"
          echo -p "gem list: $(gem list)"

    - script:
        name: Set up db
        code: RAILS_ENV=test bundle exec rake db:schema:load

    - script:
        name: Run minitest
        code: bundle exec rake test

    - script:
        name: Run lint
        code: npm run lint

    - script:
        name: Generate erd
        code: |
          bundle exec rake erd
          mv erd.pdf ${WERCKER_OUTPUT_DIR}

box: ruby:2.4.0

services:
  - postgres

build:
  steps:
    - bigtruedata/install-node:
      version: 7.5.0

    - script:
        name: Install dependencies
        code: |
          sudo apt-get update
          sudo apt-get install -y graphviz

    - npm-install

    - bundle-install

    - rails-database-yml:
      service: postgresql-docker

    - script:
        name: Echo ruby information
        code: |
          echo "ruby version $(ruby --version) running"
          echo "from location $(which ruby)"
          echo -p "gem list: $(gem list)"

    - script:
        name: Set up db
        code: RAILS_ENV=test bundle exec rake db:schema:load

    - script:
        name: Run minitest
        code: bundle exec rake test

    - script:
        name: Run lint
        code: npm run lint

    - script:
        name: Generate erd
        code: |
          bundle exec rake db:schema:load
          bundle exec rake erd
          mv erd.pdf ${WERCKER_OUTPUT_DIR}

Fix wecker settings for gernerating erd.
Fix wecker settings for gernerating erd.
