Skip to content

Commit

Permalink
Update ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaliumhexacyanoferrat authored Nov 23, 2023
1 parent 12a241b commit 3177c4e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,27 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.305
dotnet-version: 8.0.100
- name: Setup Java JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
java-version: 21
- name: Restore tools
run: dotnet tool restore
- name: Begin scan
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
run: dotnet sonarscanner begin /k:"Kaliumhexacyanoferrat_MockH" /d:sonar.login="$SONAR_TOKEN" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /o:"kaliumhexacyanoferrat" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.branch.name="${GITHUB_REF##*/}" /d:sonar.dotnet.excludeTestProjects=true
run: dotnet sonarscanner begin /k:"Kaliumhexacyanoferrat_MockH" /d:sonar.token="$SONAR_TOKEN" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /o:"kaliumhexacyanoferrat" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.branch.name="${GITHUB_REF##*/}" /d:sonar.dotnet.excludeTestProjects=true
- name: Build project
run: dotnet build MockH.sln -c Release
- name: Test project
run: dotnet test -c Release --no-build MockH.sln --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: End scan
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
run: dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
run: dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"

0 comments on commit 3177c4e

Please sign in to comment.