Browse Source

SQSCANNER-8 Execute ITs on Windows using AppVeyor

tags/2.5-rc1
Duarte Meneses 8 years ago
parent
commit
1544db3e40
2 changed files with 51 additions and 0 deletions
  1. 29
    0
      appveyor.ps1
  2. 22
    0
      appveyor.yml

+ 29
- 0
appveyor.ps1 View File

@@ -0,0 +1,29 @@
$ErrorActionPreference = "Stop"

function CheckLastExitCode
{
param ([int[]]$SuccessCodes = @(0))

if ($SuccessCodes -notcontains $LastExitCode)
{
$msg = @"
EXE RETURNED EXIT CODE $LastExitCode
CALLSTACK:$(Get-PSCallStack | Out-String)
"@
throw $msg
}
}

switch ($env:RUN)
{
"ci"
{
mvn package "--batch-mode" "-B" "-e" "-V"
CheckLastExitCode
}

default
{
throw "Unexpected test mode: ""$env:RUN"""
}
}

+ 22
- 0
appveyor.yml View File

@@ -0,0 +1,22 @@
version: 1.0.{build}

branches:
only:
- master

cache:
- C:\Users\appveyor\.m2 -> **\pom.xml

install:
- set MAVEN_VERSION=3.2.5
- choco install maven -version %MAVEN_VERSION%
- set PATH=%PATH%;C:\bin\apache-maven-%MAVEN_VERSION%\bin
- echo %JAVA_HOME%

environment:
matrix:
- RUN: ci
JAVA_HOME: C:\Program Files\Java\jdk1.7.0

build_script:
- ps: ./appveyor.ps1

Loading…
Cancel
Save