32
32
build-configuration : ' Release'
33
33
build-platform : ' Any CPU'
34
34
git-version : ' 6.0.x'
35
+ test-result-directory : ${{ runner.temp }}/test-results
35
36
36
37
jobs :
37
38
versioning :
@@ -44,16 +45,16 @@ jobs:
44
45
PACKAGE_VERSION : ${{ fromJSON(format('[ "{0}{1}", "{0}" ]', steps.gitversion.outputs.assemblySemVer, steps.gitversion.outputs.preReleaseLabelWithDash))[fromJSON(env.is-release)] }}
45
46
46
47
steps :
47
- - name : Checkout ${{ github.head_ref || github.ref }}
48
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
48
49
uses : actions/checkout@v4
49
50
with :
50
51
fetch-depth : 0
51
- - name : Install GitVersion
52
+ - name : Install GitVersion ${{ env.git-version }}
52
53
uses : gittools/actions/gitversion/setup@v3.1.11
53
54
with :
54
55
versionSpec : ${{ env.git-version }}
55
56
preferLatestVersion : true
56
- - name : Calculate version with GitVersion ${{ env.git-version }}
57
+ - name : Determine version with GitVersion ${{ env.git-version }}
57
58
id : gitversion
58
59
uses : gittools/actions/gitversion/execute@v3.1.11
59
60
with :
@@ -69,62 +70,52 @@ jobs:
69
70
ASSEMBLY_INFORMATIONAL_VERSION : ${{ needs.versioning.outputs.ASSEMBLY_INFORMATIONAL_VERSION }}
70
71
FILE_VERSION : ${{ needs.versioning.outputs.FILE_VERSION }}
71
72
steps :
72
- - name : Checkout ${{ github.head_ref || github.ref }}
73
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
73
74
uses : actions/checkout@v4
74
75
- uses : ./.github/actions/build
75
76
with :
76
77
assembly-version : ${{ env.ASSEMBLY_VERSION }}
77
78
assembly-informational-version : ${{ env.ASSEMBLY_INFORMATIONAL_VERSION }}
78
79
assembly-file-version : ${{ env.FILE_VERSION }}
79
80
build-glob-pattern : ${{ vars.SRC_DEFAULT_GLOB_PATTERN }}
80
- # - name: Setup .NET ${{ env.dotnet-sdk-version }}
81
- # uses: actions/setup-dotnet@v4
82
- # with:
83
- # dotnet-version: ${{ env.dotnet-sdk-version }}
84
- # - name: Build with .NET ${{ env.dotnet-sdk-version }}
85
- # run: dotnet build ${{ vars.SRC_SEARCH_PATTERN }} --configuration ${{ env.build-configuration }} /p:Platform=${{ env.build-platform }} /p:Version=${{ env.ASSEMBLY_VERSION }} /p:AssemblyInformationalVersion=${{ env.ASSEMBLY_INFORMATIONAL_VERSION }} /p:FileVersion=${{ env.FILE_VERSION }}
86
- # - name: Upload Build
87
- # uses: actions/upload-artifact@v4
88
- # with:
89
- # name: build
90
- # path: |
91
- # **/bin/*
92
- # **/obj/*
93
81
94
82
test :
95
83
name : Test with .NET
96
84
needs : [build]
97
85
runs-on : ubuntu-latest
98
86
steps :
99
- - name : Checkout ${{ github.head_ref || github.ref }}
87
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
100
88
uses : actions/checkout@v4
101
- - name : Setup .NET
89
+ - name : ' Setup .NET'
102
90
uses : actions/setup-dotnet@v4
103
91
with :
104
92
dotnet-version : ${{ env.dotnet-sdk-version }}
93
+ - uses : ./.github/actions/test
94
+ with :
95
+ test-project-glob-pattern : ${{ vars.TEST_DEFAULT_GLOB_PATTERN }}
96
+ test-runsettings-path : ' unit-test.runsettings'
105
97
- name : Test with .NET
106
- run : dotnet test ${{ vars.TEST_DEFAULT_GLOB_PATTERN }} --configuration ${{ env.build-configuration }} --verbosity normal --settings unit-test.runsettings -- --coverage --coverage-output-format cobertura --report-trx --results-directory ${{ runner.temp }}/test-results/
98
+ run : dotnet test ${{ vars.TEST_DEFAULT_GLOB_PATTERN }} --configuration ${{ env.build-configuration }} --verbosity normal --settings -- --coverage --coverage-output-format cobertura --report-trx --results-directory ${{ runner.temp }}/test-results/
107
99
- name : Upload Test Results
108
100
uses : actions/upload-artifact@v4
109
101
with :
110
102
name : test-results
111
- path : |
112
- ${{ runner.temp }}/test-results/*
113
- - run : dotnet tool install --global LiquidTestReports.Cli --prerelease
114
- - run : ls -R ${{ runner.temp }}/test-results/
115
- - run : liquid --inputs "Folder=${{ runner.temp }}/test-results/;File=**/*.trx;Format=Trx" --output-file ${{ runner.temp }}/test-results/test-report.md
116
- - run : cat ${{ runner.temp }}/test-results/*.md >> $GITHUB_STEP_SUMMARY
117
- name : Write Test Results Summary
118
- - run : dotnet tool update --global dotnet-coverage
119
- name : Update dotnet-coverage tool
120
- - run : dotnet-coverage merge --output ${{ runner.temp }}/test-results/test-result.cobertura.xml --output-format cobertura "${{ runner.temp }}/test-results/**/*.cobertura.xml"
121
- name : Merge Code Coverage Results
122
- - run : dotnet tool update --global dotnet-reportgenerator-globaltool
123
- name : Update dotnet-reportgenerator-globaltool tool
124
- - run : reportgenerator -reports:${{ runner.temp }}/test-results/test-result.cobertura.xml -targetdir:${{ runner.temp }}/test-results/coverage-report -reporttypes:"MarkdownSummary"
125
- name : Generate Code Coverage Results
126
- - run : cat ${{ runner.temp }}/test-results/coverage-report/Summary.md >> $GITHUB_STEP_SUMMARY
127
- name : Write Code Coverage Summary
103
+ path : ${{ runner.temp }}/test-results/*
104
+ # - run: dotnet tool install --global LiquidTestReports.Cli --prerelease
105
+ # - run: ls -R ${{ runner.temp }}/test-results/
106
+ # - run: liquid --inputs "Folder=${{ runner.temp }}/test-results/;File=**/*.trx;Format=Trx" --output-file ${{ runner.temp }}/test-results/test-report.md
107
+ # - run: cat ${{ runner.temp }}/test-results/*.md >> $GITHUB_STEP_SUMMARY
108
+ # name: Write Test Results Summary
109
+ # - run: dotnet tool update --global dotnet-coverage
110
+ # name: Update dotnet-coverage tool
111
+ # - run: dotnet-coverage merge --output ${{ runner.temp }}/test-results/test-result.cobertura.xml --output-format cobertura "${{ runner.temp }}/test-results/**/*.cobertura.xml"
112
+ # name: Merge Code Coverage Results
113
+ # - run: dotnet tool update --global dotnet-reportgenerator-globaltool
114
+ # name: Update dotnet-reportgenerator-globaltool tool
115
+ # - run: reportgenerator -reports:${{ runner.temp }}/test-results/test-result.cobertura.xml -targetdir:${{ runner.temp }}/test-results/coverage-report -reporttypes:"MarkdownSummary"
116
+ # name: Generate Code Coverage Results
117
+ # - run: cat ${{ runner.temp }}/test-results/coverage-report/Summary.md >> $GITHUB_STEP_SUMMARY
118
+ # name: Write Code Coverage Summary
128
119
129
120
pack :
130
121
name : Pack with .NET
@@ -136,7 +127,7 @@ jobs:
136
127
FILE_VERSION : ${{ needs.versioning.outputs.FILE_VERSION }}
137
128
PACKAGE_VERSION : ${{ needs.versioning.outputs.PACKAGE_VERSION }}
138
129
steps :
139
- - name : Checkout ${{ github.head_ref || github.ref }}
130
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
140
131
uses : actions/checkout@v4
141
132
- name : Setup .NET
142
133
uses : actions/setup-dotnet@v4
@@ -166,7 +157,7 @@ jobs:
166
157
os : [ubuntu-latest, windows-latest, macos-latest]
167
158
runs-on : ${{ matrix.os }}
168
159
steps :
169
- - name : Checkout ${{ github.head_ref || github.ref }}
160
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
170
161
uses : actions/checkout@v4
171
162
- name : Install .NET SDK
172
163
uses : actions/setup-dotnet@v4
@@ -202,7 +193,7 @@ jobs:
202
193
url : ${{ steps.deployment.outputs.page_url }}
203
194
runs-on : ubuntu-latest
204
195
steps :
205
- - name : Checkout ${{ github.head_ref || github.ref }}
196
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
206
197
uses : actions/checkout@v4
207
198
- name : Dotnet Setup
208
199
uses : actions/setup-dotnet@v4
@@ -240,7 +231,7 @@ jobs:
240
231
name : private-nuget-feed
241
232
runs-on : ubuntu-latest
242
233
steps :
243
- - name : Checkout ${{ github.head_ref || github.ref }}
234
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
244
235
uses : actions/checkout@v4
245
236
- name : Dotnet Setup
246
237
uses : actions/setup-dotnet@v4
@@ -264,7 +255,7 @@ jobs:
264
255
name : public-nuget-feed
265
256
runs-on : ubuntu-latest
266
257
steps :
267
- - name : Checkout ${{ github.head_ref || github.ref }}
258
+ - name : ' Checkout ${{ github.head_ref || github.ref }}'
268
259
uses : actions/checkout@v4
269
260
- name : Dotnet Setup
270
261
uses : actions/setup-dotnet@v4
0 commit comments