forked from CSClassroom/CSClassroom
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
61 lines (61 loc) · 2.08 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: '1.0.{build}'
image: Visual Studio 2017
configuration:
- Release
platform: Any CPU
environment:
# Don't report back to the mothership
DOTNET_CLI_TELEMETRY_OPTOUT: 1
MAVEN_VERSION: 3.3.9
init:
- cmd: SET PATH=%M2_HOME%\bin;%JAVA_HOME%\bin;%PATH%;
- cmd: SET M2_HOME=C:\maven\apache-maven-%MAVEN_VERSION%
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=1g -Xmx2g
- cmd: SET JAVA_OPTS=-XX:MaxPermSize=1g -Xmx2g
before_build:
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\maven" )) {
Write-Host "Downloading Maven $env:MAVEN_VERSION"
(new-object System.Net.WebClient).DownloadFile("https://repo1.maven.org/maven2/org/apache/maven/apache-maven/$env:MAVEN_VERSION/apache-maven-$env:MAVEN_VERSION-bin.zip", 'C:\maven-bin.zip')
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
}
- dir c:\maven
- dir c:\maven\apache-maven-3.3.9
- cd Services
- appveyor-retry dotnet restore -v Minimal
- cd ..
build_script:
- cd Runners\JavaCodeRunner
- mvn compile
- cd ..\..
- cd Runners\JavaProjectRunner
- mvn compile
- cd ..\..
- cd Services\src
- dotnet build "BuildService\BuildService.Endpoint" -c %CONFIGURATION%
- dotnet build "CSClassroom\CSClassroom.Webapp" -c %CONFIGURATION%
- cd ..\..
after_build:
- cd Services\src
- dotnet publish "BuildService\BuildService.Endpoint" -c %CONFIGURATION%
- dotnet publish "CSClassroom\CSClassroom.Webapp" -c %CONFIGURATION%
- cd ..\..
test_script:
- cd Runners\JavaCodeRunner
- mvn test
- cd ..\..
- cd Runners\JavaProjectRunner
- mvn test
- cd ..\..
- cd Services\test\BuildService\BuildService.Service.UnitTests
- dotnet test --configuration %CONFIGURATION%
- cd ..\..\..\..
- cd Services\test\CSClassroom\CSClassroom.Service.UnitTests
- dotnet test --configuration %CONFIGURATION%
- cd ..\..\..\..
cache:
- Services\src\CSClassroom\CSClassroom.WebApp\node_modules # project npm modules
- '%APPDATA%\npm-cache' # npm cache
- C:\maven -> appveyor.yml
- C:\Users\appveyor\.m2 -> pom.xml