Skip to content

Commit f59441c

Browse files
github-actions[bot]Copilot
authored andcommitted
ci: upload TRX test results as artifacts on failure
When `dotnet fsi build.fsx` fails (e.g. due to test failures), the .trx and blame files in TestResults/ are now uploaded as a GitHub Actions artifact (retained for 7 days). This makes it much easier to diagnose test failures without re-running the full CI pipeline locally. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 142d4b0 commit f59441c

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/pull-requests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ jobs:
4343
uses: actions/setup-dotnet@v5
4444
- name: Run CI
4545
run: dotnet fsi build.fsx
46-
46+
47+
- name: Upload test results
48+
uses: actions/upload-artifact@v4
49+
if: failure()
50+
with:
51+
name: test-results-${{ matrix.os }}
52+
path: TestResults/
53+
retention-days: 7
54+
4755
- name: Analyze Solution
4856
if: matrix.os == 'ubuntu-latest'
4957
run: dotnet msbuild /t:AnalyzeSolution

.github/workflows/push-main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ jobs:
4141
uses: actions/setup-dotnet@v5
4242
- name: Run CI
4343
run: dotnet fsi build.fsx
44+
45+
- name: Upload test results
46+
uses: actions/upload-artifact@v4
47+
if: failure()
48+
with:
49+
name: test-results-ubuntu
50+
path: TestResults/
51+
retention-days: 7
52+
4453
- name: Deploy docs
4554
uses: peaceiris/actions-gh-pages@v4
4655
with:

0 commit comments

Comments
 (0)