This repository was archived by the owner on Jan 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.54 KB
/
build.yml
File metadata and controls
36 lines (36 loc) · 1.54 KB
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
31
32
33
34
35
36
on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- uses: actions/setup-dotnet@v1
with:
dotnet-version: "3.1.x"
- uses: actions/setup-java@v1
with:
java-version: 11
- name: SonarCloud Scan
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet build-server shutdown
dotnet sonarscanner begin /k:"devterm-its_SimpleInjector.Extensions.ScopedDependencyFactory" /o:"devterm-its" /d:sonar.login="$SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="SimpleInjector.Extensions.ScopedDependencyFactory.Test/coverage.opencover.xml"
dotnet build SimpleInjector.Extensions.ScopedDependencyFactory.sln --configuration Release
dotnet test SimpleInjector.Extensions.ScopedDependencyFactory.sln --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=coverage
ls
dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
DOTNET_CLI_TELEMETRY_OPTOUT: true