Skip to content

Commit

Permalink
chore: add test report steps
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanho committed Sep 14, 2023
1 parent 1f7a908 commit 6b31ae9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Build & Test
name: pull-request

on:
pull_request:
branches: [ main ]

permissions:
contents: read
issues: read
checks: write
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -33,11 +39,15 @@ jobs:
run: dotnet test --logger "trx;LogFileName=TestResults-${{ matrix.dotnet-version }}.trx"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
if: always()
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: "./**/TestResults/TestResults-${{ matrix.dotnet-version }}.trx"
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: "./**/TestResults/TestResults-${{ matrix.dotnet-version }}.trx"

test-pack:
runs-on: ubuntu-latest
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
name: release-please

on:
push:
branches:
- main

permissions:
contents: write
issues: read
checks: write
pull-requests: write
packages: write

name: release-please

env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand Down Expand Up @@ -43,11 +45,15 @@ jobs:
run: dotnet test -c Release --logger "trx;LogFileName=TestResults-${{ matrix.dotnet-version }}.trx"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
if: always()
with:
name: dotnet-results-${{ matrix.dotnet-version }}
path: "./**/TestResults/TestResults-${{ matrix.dotnet-version }}.trx"
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: "./**/TestResults/TestResults-${{ matrix.dotnet-version }}.trx"

test-pack:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6b31ae9

Please sign in to comment.