Skip to content

Commit f40a287

Browse files
committed
Introduced build stages
1 parent ec3e8dd commit f40a287

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

.travis.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,22 @@ install:
1515
- dotnet restore
1616
before_script:
1717
- export PATH="$PATH:$HOME/.dotnet/tools"
18-
script:
19-
- |
20-
dotnet sonarscanner begin \
21-
/k:"$SONAR_PROJECT_KEY" \
22-
/d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
23-
/d:sonar.host.url="$SONAR_URL" \
24-
/d:sonar.login="$SONAR_TOKEN" \
25-
/d:sonar.cs.vstest.reportsPaths="${TEST_RESULTS_PATH}/results.trx" \
26-
/d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml"
27-
- dotnet test -c Release -l:"trx;LogFileName=results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="TestResults/coverage.xml"
28-
- dotnet publish -c Release
29-
- dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
18+
jobs:
19+
include:
20+
- stage: Sonar (begin)
21+
script:
22+
- |
23+
dotnet sonarscanner begin \
24+
/k:"$SONAR_PROJECT_KEY" \
25+
/d:sonar.organization="$SONAR_ORGANIZATION_KEY" \
26+
/d:sonar.host.url="$SONAR_URL" \
27+
/d:sonar.login="$SONAR_TOKEN" \
28+
/d:sonar.cs.vstest.reportsPaths="${TEST_RESULTS_PATH}/results.trx" \
29+
/d:sonar.cs.opencover.reportsPaths="${TEST_RESULTS_PATH}/coverage.xml"
30+
- stage: Test
31+
script:
32+
- dotnet test -c Release -l:"trx;LogFileName=results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat="opencover" /p:CoverletOutput="TestResults/coverage.xml"
33+
- dotnet publish -c Release
34+
- stage: Sonar (end)
35+
script:
36+
- dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"

0 commit comments

Comments
 (0)