image: Visual Studio 2017

platform:
  - x64

environment:
  matrix:
    - nodejs_version: "10"
  DEBUG: electron-builder
  CI: yes
  APPVEYOR: yes

cache:
  - '%USERPROFILE%\.electron'
  - node_modules -> package.json

branches:
  only:
    - next

clone_folder: c:\gisto

init:
  - git config --global core.autocrlf input

shallow_clone: true
clone_depth: 1

matrix:
  fast_finish: true

build: off

install:
  - cmd: appveyor-retry powershell Install-Product node $env:nodejs_version
  - ps: Add-Content c:\gisto\src\electron\.env "GISTO_GITHUB_CLIENT_ID=$env:GISTO_GITHUB_CLIENT_ID"
  - ps: Add-Content c:\gisto\src\electron\.env "GISTO_GITHUB_CLIENT_SECRET=$env:GISTO_GITHUB_CLIENT_SECRET"
  - npm install -g npm@latest
  - set PATH=%APPDATA%\npm;%PATH%
  - node --version && npm --version
  - npm install -g cross-env rimraf electron-builder electron-publisher-s3
  - npm install
  - npm run test:ci

build_script:
  - npm run pack:win

test: on

image: Visual Studio 2017

platform:
  - x64

environment:
  matrix:
    - nodejs_version: "10"
  DEBUG: electron-builder
  CI: yes
  APPVEYOR: yes

cache:
  - '%USERPROFILE%\.electron'
  - node_modules -> package.json

branches:
  only:
    - next

clone_folder: c:\gisto

init:
  - git config --global core.autocrlf input

shallow_clone: true
clone_depth: 1

matrix:
  fast_finish: true

build: off

install:
  - cmd: appveyor-retry powershell Install-Product node $env:nodejs_version
  - ps: Add-Content c:\gisto\src\electron\.env "GISTO_GITHUB_CLIENT_ID=$env:GISTO_GITHUB_CLIENT_ID"
  - ps: Add-Content c:\gisto\src\electron\.env "GISTO_GITHUB_CLIENT_SECRET=$env:GISTO_GITHUB_CLIENT_SECRET"
  - npm install -g npm@latest
  - set PATH=%APPDATA%\npm;%PATH%
  - node --version && npm --version
  - npm install -g cross-env rimraf electron-builder electron-publisher-s3
  - npm install
  - npm run test

build_script:
  - npm run pack:win

test: on

TEST (ci): remove coveralls from appveyour
TEST (ci): remove coveralls from appveyour
