-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.76 KB
/
cicd.yaml
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
name: CI-CD
on:
push:
branches: [ main ]
env:
SOLUTION_PATH: "./src/FinancesManagementSystem.sln"
jobs:
continous-integration:
runs-on: ubuntu-latest
name: Continous Integration
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- uses: highbyte/[email protected]
with:
# The key of the SonarQube project
sonarProjectKey: gpreviatti_FinancesManagementSystem
# The name of the SonarQube project
sonarProjectName: FinancesManagementSystem
# The name of the SonarQube organization in SonarCloud. For hosted SonarQube, skip this setting.
sonarOrganization: gpreviatti
# Optional command arguments to 'dotnet build'
dotnetBuildArguments: ${{ env.SOLUTION_PATH }} --configuration Release
# Optional command arguments to 'dotnet test'
dotnetTestArguments: |
--filter Controller ${{ env.SOLUTION_PATH }} --configuration Release --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover &&
dotnet test --filter Domain ${{ env.SOLUTION_PATH }} --configuration Release --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
# Optional extra command arguments the the SonarScanner 'begin' command
sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx"
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}