Skip to content

Commit 9ff49c6

Browse files
authored
Fixed GitHub workflow report for failed tests (#2653)
* changed target framework to .net 8.0 * Added a failing test * Update run-tests.yaml * try again * changed yaml files * Revert "try again" This reverts commit 1995f60. * Revert "Added a failing test" This reverts commit 1bcb1a1. * Final yaml files * added target framework back for PR
1 parent 9040e40 commit 9ff49c6

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.github/workflows/report-test-results.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,24 @@ jobs:
1212
runs-on: ubuntu-latest
1313
permissions: write-all
1414
steps:
15+
# Cleanup Old Files
16+
- name: Cleanup Old Files
17+
run: rm -rf $GITHUB_WORKSPACE/*.trx
18+
19+
# Download the Latest Artifacts with Unique Name
1520
- name: Download Artifacts
1621
uses: dawidd6/action-download-artifact@v2
1722
with:
18-
workflow: ${{ github.event.workflow_run.workflow_id }}
23+
run_id: ${{ github.event.workflow_run.id }}
24+
25+
# Display the Structure of Downloaded Files
1926
- name: Display structure of downloaded files
2027
run: ls -R
28+
29+
# Display the Contents of .trx Files
30+
- name: Display .trx file contents
31+
run: cat **/*.trx || echo "No .trx files found"
32+
2133
- name: Report tests results
2234
uses: AndreyAkinshin/test-reporter@0e2c48ebec2007001dd77dd4bcbcd450b96d5a38
2335
with:

.github/workflows/run-tests.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@ jobs:
1818
run: Set-MpPreference -DisableRealtimeMonitoring $true
1919
shell: powershell
2020
- uses: actions/checkout@v4
21+
# Build and Test
2122
- name: Run task 'build'
2223
shell: cmd
2324
run: ./build.cmd build
2425
- name: Run task 'in-tests-core'
2526
shell: cmd
2627
run: ./build.cmd in-tests-core -e
28+
# Upload Artifacts with Unique Name
2729
- name: Upload test results
2830
uses: actions/upload-artifact@v3
2931
if: always()
3032
with:
31-
name: test-windows-core-trx
33+
name: test-windows-core-trx-${{ github.run_id }}
3234
path: "**/*.trx"
3335

3436
test-windows-full:
@@ -38,23 +40,26 @@ jobs:
3840
run: Set-MpPreference -DisableRealtimeMonitoring $true
3941
shell: powershell
4042
- uses: actions/checkout@v4
43+
# Build and Test
4144
- name: Run task 'build'
4245
shell: cmd
4346
run: ./build.cmd build
4447
- name: Run task 'in-tests-full'
4548
shell: cmd
4649
run: ./build.cmd in-tests-full -e
50+
# Upload Artifacts with Unique Name
4751
- name: Upload test results
4852
uses: actions/upload-artifact@v4
4953
if: always()
5054
with:
51-
name: test-windows-full-trx
55+
name: test-windows-full-trx-${{ github.run_id }}
5256
path: "**/*.trx"
5357

5458
test-linux:
5559
runs-on: ubuntu-latest
5660
steps:
5761
- uses: actions/checkout@v4
62+
# Set up the environment
5863
- name: Set up Clang
5964
uses: egor-tensin/setup-clang@v1
6065
with:
@@ -70,17 +75,19 @@ jobs:
7075
run: npm install jsvu -g && jsvu --os=linux64 --engines=v8 && echo "$HOME/.jsvu/bin" >> $GITHUB_PATH
7176
- name: Install wasm-tools workload
7277
run: ./build.cmd install-wasm-tools
78+
# Build and Test
7379
- name: Run task 'build'
7480
run: ./build.cmd build
7581
- name: Run task 'unit-tests'
7682
run: ./build.cmd unit-tests -e
7783
- name: Run task 'in-tests-core'
7884
run: ./build.cmd in-tests-core -e
85+
# Upload Artifacts with Unique Name
7986
- name: Upload test results
8087
uses: actions/upload-artifact@v4
8188
if: always()
8289
with:
83-
name: test-linux-trx
90+
name: test-linux-trx-${{ github.run_id }}
8491
path: "**/*.trx"
8592

8693
test-macos:
@@ -95,17 +102,19 @@ jobs:
95102
run: npm install jsvu -g && jsvu --os=mac64 --engines=v8 && echo "$HOME/.jsvu/bin" >> $GITHUB_PATH
96103
- name: Install wasm-tools workload
97104
run: ./build.cmd install-wasm-tools
105+
# Build and Test
98106
- name: Run task 'build'
99107
run: ./build.cmd build
100108
- name: Run task 'unit-tests'
101109
run: ./build.cmd unit-tests -e
102110
- name: Run task 'in-tests-core'
103111
run: ./build.cmd in-tests-core -e
112+
# Upload Artifacts with Unique Name
104113
- name: Upload test results
105114
uses: actions/upload-artifact@v4
106115
if: always()
107116
with:
108-
name: test-macos-trx
117+
name: test-macos-trx-${{ github.run_id }}
109118
path: "**/*.trx"
110119

111120
test-pack:

0 commit comments

Comments
 (0)