Skip to content

Commit 032ac56

Browse files
committed
Rewrote .travis.yml using build matrix (part 3)
1 parent 55b4f25 commit 032ac56

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ matrix:
66
include:
77
- dotnet: 2.1.500
88
mono: none
9+
env:
10+
- WITH_SONAR_ANALYSIS=false
911
- dotnet: 2.1 # latest available release
1012
mono: none
1113
env:
1214
- WITH_SONAR_ANALYSIS=true
1315
- TEST_RESULTS_PATH=./Mastercard.Developer.OAuth1Signer.Tests/bin
1416
solution: Mastercard.Developer.OAuth1Signer.sln
15-
before_script:
16-
- export PATH="$PATH:$HOME/.dotnet/tools"
1717
install:
1818
- dotnet restore
19-
- test $WITH_SONAR_ANALYSIS && dotnet tool install --global dotnet-sonarscanner
19+
- $WITH_SONAR_ANALYSIS && dotnet tool install --global dotnet-sonarscanner
2020
before_script:
21+
- export PATH="$PATH:$HOME/.dotnet/tools"
2122
- |
22-
test $WITH_SONAR_ANALYSIS && dotnet sonarscanner begin \
23+
$WITH_SONAR_ANALYSIS && dotnet sonarscanner begin \
2324
/k:"$SONAR_PROJECT_KEY" \
2425
/n:"$SONAR_PROJECT_NAME" \
2526
/d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
@@ -31,4 +32,4 @@ script:
3132
- dotnet test -c Release -l:"trx;LogFileName=tests.trx" -r:"bin/" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="bin/coverage.xml"
3233
- dotnet publish -c Release
3334
after_success:
34-
- test $WITH_SONAR_ANALYSIS && dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
35+
- $WITH_SONAR_ANALYSIS && dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"

0 commit comments

Comments
 (0)