# appveyor file
# http://www.appveyor.com/docs/appveyor-yml

branches:
  only:
    - webpack-4
    - master
    - next
    - dev-1

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

cache:
  - "..\\.yarn-cache"
  - ".jest-cache"

install:
  - ps: Install-Product node 14 x64
  - yarn --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache
  - yarn link --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache || yarn link --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache
  - yarn link webpack --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache

build: off

matrix:
  fast_finish: true

test_script:
  - node --version
  - yarn --version
  - cmd: set JEST=--maxWorkers=2 --cacheDirectory .jest-cache
  - cmd: yarn appveyor:integration
  - cmd: yarn istanbul report --report lcovonly
  - cmd: yarn unlink webpack
  - cmd: yarn global add codecov && codecov -F integration --disable=gcov
  - cmd: del /F /Q .jest-cache\\haste-map* .jest-cache\\perf-cache* 2> null || Ver > null
