Skip to content

Commit 24ec8c5

Browse files
Update pipelines
1 parent bb80aa1 commit 24ec8c5

3 files changed

Lines changed: 96 additions & 5 deletions

File tree

.github/workflows/pull_request.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
name: Pull Request
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- 'dev'
8+
9+
jobs:
10+
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
29+
30+
- name: Restore dependencies
31+
run: dotnet restore
32+
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
64+
65+
env:
66+
Solution_Name: GofPatterns.sln
67+
Test_Project_Path: GofPatternsTests\GofPatternsTests.csproj
68+
69+
steps:
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
82+
83+
- name: Restore dependencies
84+
run: dotnet restore
85+
86+
- name: Build
87+
run: dotnet build
88+
89+
- name: Test
90+
run: dotnet test
91+
92+
- name: Restore the application
93+
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
94+
env:
95+
Configuration: Debug

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
branches:
77
- 'main'
88

9-
109
jobs:
1110

1211
release:

.github/workflows/test.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
- '**'
88
- '!main'
99
- '!dev'
10-
pull_request:
11-
branches:
12-
- 'dev'
1310

1411
jobs:
1512

@@ -54,7 +51,7 @@ jobs:
5451
output: both
5552
thresholds: '80 90'
5653

57-
- name: Add Coverage PR Comment
54+
- name: Code Coverage Result MD
5855
uses: marocchino/sticky-pull-request-comment@v2
5956
with:
6057
recreate: true

0 commit comments

Comments
 (0)