File tree Expand file tree Collapse file tree 5 files changed +65
-42
lines changed Expand file tree Collapse file tree 5 files changed +65
-42
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name: Build
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ types: [opened, synchronize, reopened]
8
+ jobs:
9
+ build:
10
+ name: Build
11
+ runs-on: windows-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ with:
15
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
16
+ - name: Cache SonarCloud packages
17
+ uses: actions/cache@v1
18
+ with:
19
+ path: ~\sonar\cache
20
+ key: ${{ runner.os }}-sonar
21
+ restore-keys: ${{ runner.os }}-sonar
22
+ - name: Cache SonarCloud scanner
23
+ id: cache-sonar-scanner
24
+ uses: actions/cache@v1
25
+ with:
26
+ path: .\.sonar\scanner
27
+ key: ${{ runner.os }}-sonar-scanner
28
+ restore-keys: ${{ runner.os }}-sonar-scanner
29
+ - name: Install SonarCloud scanner
30
+ if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
31
+ shell: powershell
32
+ run: |
33
+ New-Item -Path .\.sonar\scanner -ItemType Directory
34
+ dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
35
+ - name: Build and analyze
36
+ env:
37
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
38
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
39
+ shell: powershell
40
+ run: |
41
+ .\.sonar\scanner\dotnet-sonarscanner begin /k:"Amitpnk_Onion-architecture-ASP.NET-Core" /o:"amitpnk" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
42
+ <your build command>
43
+ .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
Original file line number Diff line number Diff line change
1
+ name : .NET Core
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ build :
7
+
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : Setup .NET
13
+ uses : actions/setup-dotnet@v1
14
+ with :
15
+ dotnet-version : 5.0.x
16
+ - name : Restore dependencies
17
+ run : dotnet restore
18
+ - name : Build
19
+ run : dotnet build --configuration Release --no-restore
20
+ - name : Test
21
+ run : dotnet test --no-restore --verbosity normal
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5
5
6
6
----
7
7
8
- ![ .NET Core] ( https://github.com/Amitpnk/Onion-architecture-ASP.NET-Core/workflows/.NET/badge.svg )
8
+ ![ .NET Core] ( https://github.com/Amitpnk/Onion-architecture-ASP.NET-Core/workflows/.NET%20Core /badge.svg )
9
9
[ ![ Bugs] ( https://sonarcloud.io/api/project_badges/measure?project=Amitpnk_Onion-architecture-ASP.NET-Core&metric=bugs )] ( https://sonarcloud.io/dashboard?id=Amitpnk_Onion-architecture-ASP.NET-Core )
10
10
[ ![ Code Smells] ( https://sonarcloud.io/api/project_badges/measure?project=Amitpnk_Onion-architecture-ASP.NET-Core&metric=code_smells )] ( https://sonarcloud.io/dashboard?id=Amitpnk_Onion-architecture-ASP.NET-Core )
11
11
[ ![ Duplicated Lines (%)] ( https://sonarcloud.io/api/project_badges/measure?project=Amitpnk_Onion-architecture-ASP.NET-Core&metric=duplicated_lines_density )] ( https://sonarcloud.io/dashboard?id=Amitpnk_Onion-architecture-ASP.NET-Core )
You can’t perform that action at this time.
0 commit comments