sudo: required
dist: trusty
language: node_js
node_js:
  - '4.2'

addons:
apt:
  sources:
    - google-chrome
  packages:
    - google-chrome-stable
    - google-chrome-beta

before_install:
  - export CHROME_BIN=chromium-browser
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start

before_script:
- npm install -g typescript
- npm install -g karma
- npm install
- npm install bower
- bower install
- grep -v '^///' < node_modules/angular-in-memory-web-api/in-memory-backend.service.d.ts > node_modules/angular-in-memory-web-api/in-memory-backend.service2.d.ts && mv node_modules/angular-in-memory-web-api/in-memory-backend.service2.d.ts node_modules/angular-in-memory-web-api/in-memory-backend.service.d.ts
- echo "export let GOOGLE_GEOCODE_KEY = '$GOOGLE_API_KEY';" > app/touchpad/secret.ts
- tsc

script: npm test

sudo: required
dist: trusty
language: node_js
node_js:
  - '4.2'

addons:
apt:
  sources:
    - google-chrome
  packages:
    - google-chrome-stable
    - google-chrome-beta

before_install:
  - export CHROME_BIN=chromium-browser
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start

before_script:
- npm install -g typescript
- npm install -g karma
- npm install
- npm install bower
- bower install
- grep -v '^///' < node_modules/angular-in-memory-web-api/in-memory-backend.service.d.ts > node_modules/angular-in-memory-web-api/in-memory-backend.service2.d.ts && mv node_modules/angular-in-memory-web-api/in-memory-backend.service2.d.ts node_modules/angular-in-memory-web-api/in-memory-backend.service.d.ts
- echo "export let GOOGLE_GEOCODE_KEY = '$GOOGLE_API_KEY';" > src/app/touchpad/secret.ts
- tsc

script: npm test

Change export command for google key api
Change export command for google key api
