Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimenting with test reporter #152

Merged
merged 9 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,19 @@ jobs:
run: dotnet build --no-restore
working-directory: src
- name: Test
run: dotnet test --no-build --verbosity normal
run: dotnet test --no-build --verbosity normal --collect "XPlat Code Coverage" --results-directory test-results --logger trx
working-directory: src
env:
PYTHON_VERSION: ${{ steps.installpython.outputs.python-version }}

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.dotnet }}
path: |
${{ github.workspace }}/src/test-results/**

build-samples:
strategy:
matrix:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "Test Report"
on:
workflow_run:
workflows: [".NET CI"]
types:
- completed
permissions:
contents: read
actions: read
checks: write
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: '.NET Tests $1'
path: test-results/*.trx
reporter: dotnet-trx
artifact: /test-results-(.*)/
Loading