Skip to content

Commit

Permalink
Fixed GitHub workflow report for failed tests (#2653)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ketanpkolte authored Oct 18, 2024
1 parent 9040e40 commit 9ff49c6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/report-test-results.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ jobs:
runs-on: ubuntu-latest
permissions: write-all
steps:
# Cleanup Old Files
- name: Cleanup Old Files
run: rm -rf $GITHUB_WORKSPACE/*.trx

# Download the Latest Artifacts with Unique Name
- name: Download Artifacts
uses: dawidd6/action-download-artifact@v2
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}

# Display the Structure of Downloaded Files
- name: Display structure of downloaded files
run: ls -R

# Display the Contents of .trx Files
- name: Display .trx file contents
run: cat **/*.trx || echo "No .trx files found"

- name: Report tests results
uses: AndreyAkinshin/test-reporter@0e2c48ebec2007001dd77dd4bcbcd450b96d5a38
with:
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ jobs:
run: Set-MpPreference -DisableRealtimeMonitoring $true
shell: powershell
- uses: actions/checkout@v4
# Build and Test
- name: Run task 'build'
shell: cmd
run: ./build.cmd build
- name: Run task 'in-tests-core'
shell: cmd
run: ./build.cmd in-tests-core -e
# Upload Artifacts with Unique Name
- name: Upload test results
uses: actions/upload-artifact@v3
if: always()
with:
name: test-windows-core-trx
name: test-windows-core-trx-${{ github.run_id }}
path: "**/*.trx"

test-windows-full:
Expand All @@ -38,23 +40,26 @@ jobs:
run: Set-MpPreference -DisableRealtimeMonitoring $true
shell: powershell
- uses: actions/checkout@v4
# Build and Test
- name: Run task 'build'
shell: cmd
run: ./build.cmd build
- name: Run task 'in-tests-full'
shell: cmd
run: ./build.cmd in-tests-full -e
# Upload Artifacts with Unique Name
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-windows-full-trx
name: test-windows-full-trx-${{ github.run_id }}
path: "**/*.trx"

test-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Set up the environment
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
Expand All @@ -70,17 +75,19 @@ jobs:
run: npm install jsvu -g && jsvu --os=linux64 --engines=v8 && echo "$HOME/.jsvu/bin" >> $GITHUB_PATH
- name: Install wasm-tools workload
run: ./build.cmd install-wasm-tools
# Build and Test
- name: Run task 'build'
run: ./build.cmd build
- name: Run task 'unit-tests'
run: ./build.cmd unit-tests -e
- name: Run task 'in-tests-core'
run: ./build.cmd in-tests-core -e
# Upload Artifacts with Unique Name
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-linux-trx
name: test-linux-trx-${{ github.run_id }}
path: "**/*.trx"

test-macos:
Expand All @@ -95,17 +102,19 @@ jobs:
run: npm install jsvu -g && jsvu --os=mac64 --engines=v8 && echo "$HOME/.jsvu/bin" >> $GITHUB_PATH
- name: Install wasm-tools workload
run: ./build.cmd install-wasm-tools
# Build and Test
- name: Run task 'build'
run: ./build.cmd build
- name: Run task 'unit-tests'
run: ./build.cmd unit-tests -e
- name: Run task 'in-tests-core'
run: ./build.cmd in-tests-core -e
# Upload Artifacts with Unique Name
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-macos-trx
name: test-macos-trx-${{ github.run_id }}
path: "**/*.trx"

test-pack:
Expand Down

0 comments on commit 9ff49c6

Please sign in to comment.