Skip to content

Commit 8a5ed6e

Browse files
author
Christof Senn
committed
upload log files also if previous step fails
1 parent 962346d commit 8a5ed6e

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

‎.gitea/workflows/ci-tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Run tests with coverage
3333
run: >
34-
dotnet test Remote.Linq.slnx -f ${{ matrix.framework }} /bl `
34+
dotnet test Remote.Linq.slnx -f ${{ matrix.framework }} /bl:msbuild.${{ matrix.framework }}.binlog `
3535
--coverlet `
3636
--results-directory TestResults `
3737
--coverlet-output-format json `

‎.github/workflows/ci-tests.yml‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
global-json-file: global.json
2222

2323
- name: Restore
24-
run: dotnet restore Remote.Linq.slnx --locked-mode
24+
run: dotnet restore Remote.Linq.slnx --locked-mode /bl:msbuild.restore.binlog
2525

2626
- name: Build
27-
run: dotnet build Remote.Linq.slnx --no-restore
27+
run: dotnet build Remote.Linq.slnx --no-restore /bl:msbuild.build.binlog
2828

2929
- name: Run tests with coverage
3030
run: >
31-
dotnet test Remote.Linq.slnx --no-build `
31+
dotnet test Remote.Linq.slnx --no-build /bl:msbuild.test.binlog `
3232
--coverlet `
3333
--results-directory TestResults `
3434
--coverlet-output-format json `
@@ -39,8 +39,18 @@ jobs:
3939
--coverlet-exclude-by-attribute DebuggerNonUserCode `
4040
--coverlet-exclude-by-attribute CompilerGenerated
4141
42-
- name: Upload coverage artifact
42+
- name: Upload build logs
4343
if: always()
44+
uses: actions/upload-artifact@v7
45+
with:
46+
name: msbuild_logs
47+
path: |
48+
msbuild.restore.binlog
49+
msbuild.build.binlog
50+
msbuild.test.binlog
51+
if-no-files-found: error
52+
53+
- name: Upload coverage reports
4454
uses: actions/upload-artifact@v7
4555
with:
4656
name: coverage

0 commit comments

Comments
 (0)