forked from deinsoftware/toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (25 loc) · 1.04 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
language: csharp
mono: none
sudo: required
dist: xenial
dotnet: 2.2
solution: ToolBox/ToolBox.csproj
install:
- dotnet tool install --global dotnet-sonarscanner
- dotnet restore ToolBox/ToolBox.csproj
- dotnet restore ToolBox.Tests/ToolBox.Tests.csproj
before_script:
- export PATH="$PATH:$HOME/.dotnet/tools"
script:
- dotnet sonarscanner begin /k:"dein:toolbox" /n:"ToolBox" /v:"1.4.4" /o:"dein" /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="lcov.opencover.xml" || true
- dotnet build ToolBox/ToolBox.csproj
- dotnet test ToolBox.Tests/ToolBox.Tests.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../lcov
- 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"