forked from ThreeMammals/Ocelot
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.34 KB
/
code_quality_sonarqube.yml
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
name: Ocelot Code Quality Checks
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
push:
branches: [ "release/20.0" ]
pull_request:
branches: [ "release/20.0" ]
jobs:
CI_Pipeline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore Ocelot.sln
- name: Build
run: dotnet build --no-restore Ocelot.sln
- name: Unit & Integration Test
run: dotnet test --no-build Ocelot.sln /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
- name: SonarScanner for .NET 7 with pull request decoration support
uses: highbyte/[email protected]
with:
sonarProjectKey: ggnaegi_Ocelot
sonarProjectName: Ocelot
sonarOrganization: ggnaegi
dotnetBuildArguments: Ocelot.sln
dotnetDisableTests: true
sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/*.opencover.xml" /d:sonar.verbose=true /d:sonar.scm.exclusions.disabled=true /d:sonar.coverage.exclusions="**Test*.cs"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}