image: Visual Studio 2017

branches:
  only:
    - master

environment:
  DEVSTACK_WORKSPACE: x:/devstack
  SHALLOW_CLONE: 1

install:
- curl -fsSL -o make-4.2.1-without-guile-w32-bin.zip https://sourceforge.net/projects/ezwinports/files/make-4.2.1-without-guile-w32-bin.zip/download
- 7z x make-4.2.1-without-guile-w32-bin.zip -oC:\"Program Files"\Git\mingw64

build_script:
# Increase the Linux VM memory from the default 2 GB to 4 GB
- ps: Get-VM 'MobyLinuxVM' | Set-VMMemory -DynamicMemoryEnabled $true -MaximumBytes (4*1024*1024*1024)
# See https://ci.appveyor.com/project/appveyor-tests/docker-ce for context on
# using Linux Docker containers in AppVeyor Windows VMs
#
# Switching Docker to Linux for the first time takes around a minute. This is
# the time required to start the "MobyLinuxVM" VM:
# This won't work until we switch back to a paid AppVeyor plan after resolving
# https://openedx.atlassian.net/browse/TE-2761
#- docker-switch-linux
- md X:\devstack
- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make dev.clone.https\""
# Stop here until we get provisioning to finish reliably
#- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make dev.pull\""

test_script:
- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make help\""
- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make check-memory\""
- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make validate\""
- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make dev.status\""
- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make dev.checkout\""
# Stop here until we get provisioning to finish reliably
#- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make dev.provision\""
#- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make dev.up\""
# LMS needs like 60 seconds to come up
#- ps: Start-Sleep -s 60
#- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make healthchecks\""
#- "\"%ProgramFiles%/Git/bin/bash.exe\" -c \"make validate-lms-volume\""
