-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
51 lines (50 loc) · 1.77 KB
/
action.yml
File metadata and controls
51 lines (50 loc) · 1.77 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Analyze with SonarCloud
description: An opinionated action that downloads SonarCloud quality profiles and prepares your project for SonarScanner for .NET.
inputs:
token:
description: The SonarCloud generated token.
required: true
projectKey:
description: The key of your project in SonarCloud.
required: true
organization:
description: The name of your organization in SonarCloud.
required: true
version:
description: The version of your project, e.g. 1.0.0.
required: true
host:
description: The host URL of your SonarCloud instance, e.g. https://sonarcloud.io.
required: true
default: 'https://sonarcloud.io'
parameters:
description: Additional properties to be passed to the scanner. Default is to use properties tailored for C# and the coding conventions followed by Codebelt.
required: false
default: >-
-d:sonar.exclusions='**/obj/**,**/bin/**'
runs:
using: composite
steps:
- name: SonarScanner for .NET
run: >-
dotnet sonarscanner begin
-k:'${{ inputs.projectKey }}'
-o:'${{ inputs.organization }}'
-v:'${{ inputs.version }}'
-d:sonar.token='${{ inputs.token }}'
-d:sonar.host.url='${{ inputs.host }}'
-d:sonar.cs.opencover.reportsPaths='${{ github.workspace }}/artifacts/TestResults*/**/*opencover.xml'
-d:sonar.cs.vstest.reportsPaths='${{ github.workspace }}/artifacts/TestResults*/**/*.trx'
${{ inputs.parameters }}
env:
GITHUB_TOKEN: ${{ github.token }}
SONAR_TOKEN: ${{ inputs.token }}
shell: bash
- name: Download all artifacts
uses: actions/download-artifact@v7
with:
path: ${{ github.workspace }}/artifacts
pattern: TestResults*
branding:
icon: 'umbrella'
color: 'blue'