Skip to content

Commit

Permalink
Fix test results
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzimarev committed Sep 26, 2023
1 parent 8fe4517 commit 0c97a0b
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.1
uses: JetBrains/qodana-action@v2023.2
with:
pr-mode: false
env:
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ on:
pull_request:

jobs:
event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}
test:
runs-on: ubuntu-latest
# env:
Expand Down Expand Up @@ -32,13 +41,10 @@ jobs:
name: Run tests
run: dotnet test --no-build
-
name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
name: Upload Test Results
if: always()
uses: actions/upload-artifact@v3
with:
check_name: test results
comment_title: Test results
files: |
test-results/**/*.xml
test-results/**/*.trx
test-results/**/*.json
name: Test Results
path: |
test-results/*.xml
38 changes: 38 additions & 0 deletions .github/workflows/test-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test Results

on:
workflow_run:
workflows: ["PR Build and test"]
types:
- completed
permissions: {}

jobs:
test-results:
name: Test Results
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion != 'skipped'

permissions:
checks: write
pull-requests: write
actions: read

steps:
-
name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
with:
run_id: ${{ github.event.workflow_run.id }}
path: artifacts
-
name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
commit: ${{ github.event.workflow_run.head_sha }}
event_file: artifacts/Event File/event.json
event_name: ${{ github.event.workflow_run.event }}
files: |
test-results/**/*.xml
test-results/**/*.trx
test-results/**/*.json

0 comments on commit 0c97a0b

Please sign in to comment.