-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
28 lines (26 loc) · 1.12 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
language: csharp
solution: csharp_cryptoexamples.sln
install:
- dotnet tool install --global dotnet-sonarscanner
- dotnet restore
matrix:
include:
- dotnet: 2.1
mono: none
# env: DOTNETCORE=1 # optional, can be used to take different code paths in your script
addons:
sonarcloud:
organization: "kmindi-github" # the key of the organization
before_script:
- export PATH="$PATH:$HOME/.dotnet/tools"
script:
- dotnet sonarscanner begin /k:"csharp-cryptoexamples" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$SONAR_TOKEN" /d:sonar.language="cs" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*, **/src/ExmapleKeyStorageProvider.cs" /d:sonar.cs.opencover.reportsPaths="lcov.opencover.xml" || true
- dotnet build csharp_cryptoexamples.sln
- dotnet test ./csharp_cryptoexamplesTest/csharp_cryptoexamplesTest.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=../lcov
- dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN" || true
#- sonar-scanner
cache:
directories:
- '$HOME/.nuget/packages'
- '$HOME/.local/share/NuGet/Cache'
- '$HOME/.sonar/cache'