1-
1+
22name : Pull Request
33
44on :
88
99jobs :
1010
11- test :
11+ test-linux :
12+
13+ runs-on : ubuntu-latest
14+
15+ env :
16+ Solution_Name : GofPatterns.sln
17+ Test_Project_Path : GofPatternsTests\GofPatternsTests.csproj
18+
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v3
22+ with :
23+ fetch-depth : 0
24+
25+ - name : Install .NET Core
26+ uses : actions/setup-dotnet@v3
27+ with :
28+ dotnet-version : 6.0.x
1229
13- strategy :
14- matrix :
15- configuration : [Debug]
16- os : [windows-latest, ubuntu-latest]
30+ - name : Restore dependencies
31+ run : dotnet restore
1732
18- runs-on : ${{ matrix.os }}
33+ - name : Build
34+ run : dotnet build --configuration Debug --no-restore
35+
36+ - name : Test
37+ run : dotnet test --configuration Debug --no-build --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
38+
39+ - name : Code Coverage Result MD
40+ uses : irongut/CodeCoverageSummary@v1.3.0
41+ with :
42+ filename : coverage/**/coverage.cobertura.xml
43+ badge : true
44+ fail_below_min : true
45+ format : markdown
46+ hide_branch_rate : false
47+ hide_complexity : true
48+ indicators : true
49+ output : both
50+ thresholds : ' 80 90'
51+
52+ - name : Code Coverage Result MD
53+ uses : marocchino/sticky-pull-request-comment@v2
54+ with :
55+ recreate : true
56+ path : code-coverage-results.md
57+
58+ - name : Write to Job Summary
59+ run : cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
60+
61+ test-windows :
62+
63+ runs-on : windows-latest
1964
2065 env :
2166 Solution_Name : GofPatterns.sln
2267 Test_Project_Path : GofPatternsTests\GofPatternsTests.csproj
2368
2469 steps :
25- - name : Checkout
26- uses : actions/checkout@v3
27- with :
28- fetch-depth : 0
70+ - name : Checkout
71+ uses : actions/checkout@v3
72+ with :
73+ fetch-depth : 0
74+
75+ - name : Install .NET Core
76+ uses : actions/setup-dotnet@v3
77+ with :
78+ dotnet-version : 6.0.x
79+
80+ - name : Setup MSBuild.exe
81+ uses : microsoft/setup-msbuild@v1.0.2
2982
30- - name : Install .NET Core
31- uses : actions/setup-dotnet@v3
32- with :
33- dotnet-version : 6.0.x
83+ - name : Restore dependencies
84+ run : dotnet restore
3485
35- - name : Restore dependencies
36- run : dotnet restore
86+ - name : Build
87+ run : dotnet build
3788
38- - name : Build
39- run : dotnet build
89+ - name : Test
90+ run : dotnet test
4091
41- - name : Test
42- run : dotnet test
92+ - name : Restore the application
93+ run : msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
94+ env :
95+ Configuration : Debug
0 commit comments