-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
31 lines (25 loc) · 1.18 KB
/
.travis.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
language: csharp
mono: none
dotnet: 3.1
addons:
sonarcloud:
organization: $SONAR_ORGANIZATION
solution: eawx-build/eawx-build.csproj
install:
- dotnet tool install --global dotnet-sonarscanner
- dotnet restore eawx-build/eawx-build.csproj
- dotnet restore eawx-build-test/eawx-build-test.csproj
before_script:
- export PATH="$PATH:$HOME/.dotnet/tools"
- git fetch origin master
script:
- dotnet sonarscanner begin /k:$SONAR_PROJECT /o:$SONAR_ORGANIZATION /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login=$SONAR_TOKEN /d:sonar.language="cs" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /d:sonar.coverage.exclusions="eawx-build-test/**,**/*Test.cs,**/TestUtility.cs" /d:sonar.cs.opencover.reportsPaths="/home/travis/build/AlamoEngine-Tools/eaw-ci/coverage.netcoreapp3.1.opencover.xml" || true
- dotnet build eawx-build/eawx-build.csproj
- dotnet build eawx-build-test/eawx-build-test.csproj
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../
- dotnet sonarscanner end /d:sonar.login=$SONAR_TOKEN || true
cache:
directories:
- '$HOME/.nuget/packages'
- '$HOME/.local/share/NuGet/Cache'
- '$HOME/.sonar/cache'