environment:
  MONGODB_CONNECTION_STRING: mongodb://127.0.0.1

services:
  - mongodb

# Do not insert any code under here without making sures it's in publishingtest first
os:
  - Visual Studio 2017

platform:
  - x64

install:
  - ps: Install-Product node 610
  - npm install

test_script:
  - node --version
  - npm --version
  - npm test
  - curl -o package.sh -L https://raw.githubusercontent.com/deepstreamIO/deepstream.io-connector-publishingtest/master/scripts/package.sh
  - bash package.sh
  - For /d %%d in ( build\** ) do MOVE %%d %cd%

artifacts:
  - path: 'build\*.zip'
    name: 'deepstream.io-connector'

  - path: '**\*.zip'

deploy:
  - provider: GitHub
    release: $(APPVEYOR_REPO_TAG_NAME)
    description: 'Release description'
    auth_token:
      secure: tZHuiZVCwkXRYMihVyoNrmDxAm6xPbXyop7Plg5uUWIIqA1EoUCrTYd/V+0D1I+Y
    artifact: 'deepstream.io-connector'
    draft: false
    on:
      appveyor_repo_tag: true

after_deploy:
  - curl -o test.sh -L https://raw.githubusercontent.com/deepstreamIO/deepstream.io-connector-publishingtest/master/scripts/test.sh
  - chmod 555 test.sh
  - bash test.sh

build: off
