Skip to content

Re-worked PR/CI build support #18

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

Merged
merged 2 commits into from
May 31, 2025
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
22 changes: 17 additions & 5 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ on:
- '**.dic'

jobs:
# see: https://github.com/EnricoMi/publish-unit-test-result-action?tab=readme-ov-file#support-fork-repositories-and-dependabot-branches
event_file:
name: "Event File"
runs-on: windows-latest
steps:
- name: Upload event file
uses: actions/upload-artifact@v4
with:
name: Event File
path: ${{ github.event_path }}

build_target:
runs-on: windows-latest
steps:
Expand All @@ -38,14 +49,15 @@ jobs:
- name: Run Tests
run: ./Invoke-Tests.ps1

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/windows@v2
if: ${{ github.event_name == 'push' }}
- name: Upload Test Results
uses: actions/upload-artifact@v4
with:
files: BuildOutput/Test-Results/*.trx
name: Test Results
path: BuildOutput/Test-Results/*.trx

- name: Upload NuGET Packages
uses: actions/upload-artifact@v4
with:
name: Nuget Packages
name: NuGet Packages
path: ./BuildOutput/NuGet

43 changes: 43 additions & 0 deletions .github/workflows/test-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test Results

on:
workflow_run:
workflows: ["CI-Build"]
types:
- completed
permissions: {}

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

permissions:
checks: write

# needed unless run with comment_mode: off
pull-requests: write

# only needed for private repository
#contents: read
# only needed for private repository
#issues: read

# required by download step to access artifacts API
actions: read

steps:
- name: Download and Extract Artifacts
uses: dawidd6/action-download-artifact@e7466d1a7587ed14867642c2ca74b5bcc1e19a2d
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: "artifacts/**/*.xml"