Skip to content

Commit

Permalink
Update dotnet.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybibikov authored Apr 16, 2024
1 parent 2e73104 commit a5702cb
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: CI

permissions:
contents: read
pull-requests: write # required if create-pr-comment: true
checks: write # required if create-status-check: true

on:
push:
branches: [ "master", "development" ]
Expand Down Expand Up @@ -38,3 +43,41 @@ jobs:
with:
TRX_PATH: ${{ github.workspace }}/test-results #This should be the path to your TRX files
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}


- name: Process trx reports
id: process-trx
# You may also reference just the major or major.minor version
uses: im-open/process-dotnet-test-results@v3.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
base-directory: './test-results'
create-status-check: true
create-pr-comment: true
update-comment-if-one-exists: true
ignore-test-failures: true
timezone: 'america/denver'
comment-identifier: 'bff-tests'

# Optional
- name: Annotate Test Outcome
if: steps.process-trx.outputs.test-results-truncated == 'true'
run: cat ${{ steps.process-trx.outputs.test-results-file-path }} > $GITHUB_STEP_SUMMARY

# Optional
- name: Upload Outcome as artifact if character limit reached
if: steps.process-trx.outputs.test-results-truncated == 'true'
uses: actions/upload-artifact@v4
with:
name: Cypress-Results
path: |
${{ steps.process-trx.outputs.test-results-file-path }}
retention-days: 7

- run: ./do-other-advanced-things-in-the-build.sh

- name: Fail if there were test problems
if: steps.process-trx.outputs.test-outcome == 'Failed'
run: |
echo "There were test failures."
exit 1

0 comments on commit a5702cb

Please sign in to comment.