-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.travis.yml
25 lines (25 loc) · 1.13 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
language: csharp
mono: none
solution: Xendor.sln
sudo: required
dist: xenial
dotnet: 3.1
install:
- dotnet tool install --global dotnet-sonarscanner
- dotnet tool install --global coverlet.console
- dotnet restore Xendor.sln
before_script:
- export PATH="$PATH:$HOME/.dotnet/tools"
script:
- dotnet sonarscanner begin /k:"$ORGANIZATION_KEY:$PROJECT_KEY" /n:"$PROJECT_KEY" /v:"0.0.1" /o:"$ORGANIZATION_KEY" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$SONAR_KEY" /d:sonar.language="cs" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /d:sonar.cs.opencover.reportsPaths="test/coverage.opencover.xml" /d:sonar.coverage.exclusions="test/**" || true
- dotnet build Xendor.sln
- dotnet test Xendor.sln --filter Tests --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../coverage.opencover.xml /p:Exclude=\"[xunit*]*,[*.Tests]*\"
- dotnet sonarscanner end /d:sonar.login="$SONAR_KEY" || true
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
- DOTNET_CLI_TELEMETRY_OPTOUT=1
cache:
directories:
- '$HOME/.nuget/packages'
- '$HOME/.local/share/NuGet/Cache'
- '$HOME/.sonar/cache'