forked from datastax/csharp-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.yaml
56 lines (52 loc) · 1.95 KB
/
build.yaml
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
os:
- ubuntu/trusty64
cassandra:
- 2.0
- 2.1
- 2.2
- 3.0
- 3.7
env:
CSHARP_VERSION:
- mono
- netcore
build:
- script: |
# Set the Java paths (for CCM)
export JAVA_HOME=$CCM_JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
# Define Cassandra runtime
echo "==========setting cassandra version=========="
export CASSANDRA_VERSION=$CCM_CASSANDRA_VERSION
echo "==========installing saxon parser==========="
sudo apt-get install -y libsaxon-java
if [ $CSHARP_VERSION = 'mono' ]; then
echo "==========csharp verion mono=========="
# Define alias for Nuget
nuget() {
mono /home/jenkins/nuget/NuGet.exe "$@"
}
export -f nuget
# Install the required packages
export EnableNuGetPackageRestore=true
nuget restore src/Cassandra.sln
nuget install NUnit.Runners -Version 3.4.1 -OutputDirectory testrunner
# Compile the driver and test code
xbuild /p:Configuration=Release /v:m /p:restorepackages=false src/Cassandra.sln
# Run the tests
echo "==========RUNNING FULL SUITE OF TESTS=========="
mono ./testrunner/NUnit.ConsoleRunner.3.4.1/tools/nunit3-console.exe src/Cassandra.IntegrationTests/bin/Release/Cassandra.IntegrationTests.dll --where:cat=short --labels=All --result:"TestResult_nunit3.xml"
else
echo "==========csharp verion netcore=========="
# Install the required packages
dotnet restore
# Run the tests
echo "==========RUNNING FULL SUITE OF TESTS=========="
pushd src/Cassandra.IntegrationTests
dotnet test -f netcoreapp1.0 --work=../../ --where:cat=short --result=TestResult_nunit3.xml
popd
fi
echo "==========parsing nunit3 report================"
saxon-xslt -o TestResult.xml TestResult_nunit3.xml tools/nunit3-xunit.xslt
- xunit:
- "TestResult.xml"