-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4.1.7 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v4.0.0 | ||
- uses: actions/setup-dotnet@v4.0.0 | ||
with: | ||
dotnet-version: 8.0.100 | ||
- run: dotnet build --configuration Release | ||
- run: | | ||
dotnet test --configuration Release --no-restore --no-build \ | ||
--logger "trx;LogFileName=$(PWD)/logs/test-results.trx" | ||
--logger "trx;LogFileName=${{ github.workspace }}/logs/test-results.trx" | ||
- run: echo "PWD=$(pwd)" >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@v4 # upload test results | ||
if: success() || failure() # run this step even if previous step failed | ||
with: | ||
name: test-results | ||
path: $(PWD)/logs/test-results.trx | ||
path: ${{ github.workspace }}/logs/test-results.trx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Test Report | ||
on: | ||
pull_request: | ||
workflow_run: | ||
workflows: [Build and Test] | ||
types: [completed] | ||
|
||
permissions: | ||
contents: read | ||
actions: read | ||
checks: write | ||
|
||
jobs: | ||
report: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: dorny/test-reporter@v1.9.1 | ||
with: | ||
artifact: test-results | ||
name: XUnit Tests | ||
path: test-results.trx | ||
reporter: dotnet-trx |