box: node:0.12

# Data sources/services
services:
  - modli/dynamodb
  - modli/mysql

build:
  steps:
    - script:
        name: dynamodb config
        code: |
          export MODLI_DYNAMODB_HOST=http://${DYNAMODB_PORT_8000_TCP_ADDR}:${DYNAMODB_PORT_8000_TCP_PORT}
    - script:
        name: mysql config
        code: |
          export MODLI_MYSQL_HOST=MYSQL_PORT_3306_TCP_ADDR
          export MODLI_MYSQL_DATABASE=MYSQL_ENV_MYSQL_DATABASE
          export MODLI_MYSQL_PORT=MYSQL_PORT_3306_TCP_PORT
          export MODLI_MYSQL_PASSWORD=MYSQL_ENV_MYSQL_PASSWORD
          export MODLI_MYSQL_USERNAME=MYSQL_ENV_MYSQL_USER
    - script:
        name: echo env
        code: |
          env
    - npm-install
    - script:
        name: lint code
        code: |
          make lint
    - script:
        name: run tests
        code: |
          make test
    - script:
        name: run coverage
        code: |
          make test-cover
    - script:
        name: build
        code: |
          make build
          
  after-steps:
    # Run and report coverage
    - script:
        name: send code coverage report
        code: |
          npm install -g codeclimate-test-reporter
          codeclimate-test-reporter < coverage/lcov.info

box: node:0.12

# Data sources/services
services:
  - modli/dynamodb
  - modli/mysql

build:
  steps:
    - script:
        name: dynamodb config
        code: |
          export MODLI_DYNAMODB_HOST=http://${DYNAMODB_PORT_8000_TCP_ADDR}:${DYNAMODB_PORT_8000_TCP_PORT}
    - script:
        name: mysql config
        code: |
          export MODLI_MYSQL_HOST=${MYSQL_PORT_3306_TCP_ADDR}
          export MODLI_MYSQL_DATABASE=${MYSQL_ENV_MYSQL_DATABASE}
          export MODLI_MYSQL_PORT=${MYSQL_PORT_3306_TCP_PORT}
          export MODLI_MYSQL_PASSWORD=${MYSQL_ENV_MYSQL_PASSWORD}
          export MODLI_MYSQL_USERNAME=${MYSQL_ENV_MYSQL_USER}
    - script:
        name: echo env
        code: |
          env
    - npm-install
    - script:
        name: lint code
        code: |
          make lint
    - script:
        name: run tests
        code: |
          make test
    - script:
        name: run coverage
        code: |
          make test-cover
    - script:
        name: build
        code: |
          make build
          
  after-steps:
    # Run and report coverage
    - script:
        name: send code coverage report
        code: |
          npm install -g codeclimate-test-reporter
          codeclimate-test-reporter < coverage/lcov.info

Change from literal to variable
Change from literal to variable
