Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
32 changes: 14 additions & 18 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ jobs:
done
echo "Processed $conv TRX file(s)"


- name: Publish Test Report
if: always()
uses: ctrf-io/github-test-reporter@v1
Expand Down Expand Up @@ -186,24 +185,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Save PR Number
if: github.event_name == 'pull_request'
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV

- name: Create PR Comment
if: always()
uses: ctrf-io/github-test-reporter@v1
with:
report-path: 'ctrf/**/*.json'

summary: true
pull-request: true
use-suite-name: true
update-comment: true
always-group-by: true
overwrite-comment: true
upload-artifact: false
- name: Write PR Number to File
if: github.event_name == 'pull_request'
run: echo "$PR_NUMBER" > pr_number.txt
shell: bash

pull-request-report: true
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload PR Number Artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt

- name: Summary
run: echo "All matrix test jobs completed."
run: echo "All matrix test jobs completed."
61 changes: 61 additions & 0 deletions .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Create PR Comments

on:
workflow_run:
workflows: ["Tests"]
types: [completed]

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

jobs:
pr-comment:
name: Post Test Result as PR comment
runs-on: ubuntu-24.04
if: github.event.workflow_run.event == 'pull_request'

steps:
- name: Download CTRF artifact
uses: dawidd6/action-download-artifact@v8
with:
github_token: ${{ github.token }}
run_id: ${{ github.event.workflow_run.id }}
name: ctrf-report
path: ctrf

- name: Download PR Number Artifact
uses: dawidd6/action-download-artifact@v8
with:
github_token: ${{ github.token }}
run_id: ${{ github.event.workflow_run.id }}
name: pr_number
path: pr_number

- name: Read PR Number
run: |
PR_NUMBER=$(cat pr_number/pr_number.txt | grep -E '^[0-9]+$')
if [ -z "$PR_NUMBER" ]; then
echo "Error: PR_NUMBER is not a valid integer."
exit 1
fi
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
- name: Post PR Comment
uses: ctrf-io/github-test-reporter@v1
with:
report-path: 'ctrf/**/*.json'
issue: ${{ env.PR_NUMBER }}

summary: true
pull-request: true
use-suite-name: true
update-comment: true
always-group-by: true
overwrite-comment: true
upload-artifact: false

pull-request-report: true
env:
GITHUB_TOKEN: ${{ github.token }}
4 changes: 4 additions & 0 deletions src/ElectronNET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{985D39A7-5216-4945-8167-2FD0CB387BD8}"
ProjectSection(SolutionItems) = preProject
..\.github\workflows\ci.yml = ..\.github\workflows\ci.yml
..\.github\workflows\integration-tests.yml = ..\.github\workflows\integration-tests.yml
..\.github\workflows\pr-comment.yml = ..\.github\workflows\pr-comment.yml
..\.github\workflows\publish-wiki.yml = ..\.github\workflows\publish-wiki.yml
..\.github\workflows\trailing-whitespace-check.yml = ..\.github\workflows\trailing-whitespace-check.yml
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "_build", "..\nuke\_build.csproj", "{015CB06B-6CAE-209F-E050-21C3ACA5FE9F}"
Expand Down