Skip to content

Report .NET test checks directly on same-repository PRs - #874

Merged
AndreaCuneo merged 5 commits into
masterfrom
copilot/fix-dotnet-tests-reporting
Aug 14, 2026
Merged

Report .NET test checks directly on same-repository PRs#874
AndreaCuneo merged 5 commits into
masterfrom
copilot/fix-dotnet-tests-reporting

Conversation

Copilot AI commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

The DotNET Tests check was inconsistently published for PRs, especially for bot- and Copilot-authored branches, because reporting depended on a separate workflow_run.

  • PR reporting
    • Publish the test check directly from CI for same-repository pull requests.
    • Explicitly create a Check Run instead of only an Actions Summary.
  • Fallback reporting
    • Retain Test Report for pushes and fork-based pull requests.
    • Skip duplicate workflow-run reports for same-repository PRs.
if: ${{ github.event_name == 'pull_request' &&
  github.event.pull_request.head.repo.full_name == github.repository }}
uses: dorny/test-reporter@v3
with:
  name: DotNET Tests
  reporter: dotnet-trx
  use-actions-summary: 'false'

@AndreaCuneo
AndreaCuneo marked this pull request as ready for review August 14, 2026 08:15
@AndreaCuneo
AndreaCuneo requested a review from a team as a code owner August 14, 2026 08:15
Copilot AI lite review requested due to automatic review settings August 14, 2026 08:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts GitHub Actions test reporting so same-repo pull requests get a first-class DotNET Tests Check Run directly from the CI workflow, while keeping the existing workflow_run-based reporting for pushes and fork PRs.

Changes:

  • Add workflow-level permissions and a dorny/test-reporter@v3 step in CI to publish a Check Run for same-repo PRs.
  • Gate tests-report.yml so it skips reporting when the originating workflow_run came from a same-repo pull request (avoids duplicate reports).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/ci.yml Adds permissions + publishes DotNET Tests Check Run directly from CI for same-repo PRs.
.github/workflows/tests-report.yml Skips workflow-run reporting for same-repo PR-originated CI runs to prevent duplicate checks.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
Copilot AI review requested due to automatic review settings August 14, 2026 08:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI and others added 2 commits August 14, 2026 13:44
Co-authored-by: AndreaCuneo <5227688+AndreaCuneo@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andrea Cuneo <kaildio@gmail.com>
Copilot AI review requested due to automatic review settings August 14, 2026 11:44
@AndreaCuneo
AndreaCuneo force-pushed the copilot/fix-dotnet-tests-reporting branch from 02ab3cd to 237dec4 Compare August 14, 2026 11:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Configure security-and-quality queries, local threat modeling, C# no-build analysis, and docs/tests exclusions.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 14, 2026 12:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.github/workflows/codeql.yml:26

  • These CodeQL workflow/config changes (adding tests/** to paths-ignore, switching to build-mode matrix include, and introducing a repo codeql-config.yml) are not mentioned in the PR description, which is focused on test check reporting. Please either update the PR description to cover the CodeQL scope change (including rationale/impact), or split these CodeQL adjustments into a separate PR to keep review and rollback isolated.
on:
  push:
    branches: [ "master" ]
    paths-ignore:
      - 'docs/**'
      - 'tests/**'
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "master" ]
    paths-ignore:
      - 'docs/**'
      - 'tests/**'
  schedule:

Cache CodeQL project dependencies for faster advanced-setup analyses.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 14, 2026 12:43
Keep wildcard exclusion patterns valid for the CodeQL configuration format.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

.github/workflows/ci.yml:81

  • This step won’t run when dotnet test fails. In GitHub Actions, steps after a failure are skipped unless the condition includes a status check function like always()/failure(). That means failing tests won’t publish the "DotNET Tests" check run, which is the main goal of this change.
    - name: Publish test report for same-repository pull requests
      if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
      uses: dorny/test-reporter@v3

Copilot AI review requested due to automatic review settings August 14, 2026 12:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.github/workflows/ci.yml:15

  • Workflow permissions grant actions: write, which is broader than needed for publishing a Check Run. Prefer least-privilege here (typically checks: write + contents: read is sufficient) to reduce token blast radius on PRs.
permissions:
  contents: read
  actions: write
  checks: write

.github/workflows/codeql.yml:26

  • This PR’s description is focused on test check reporting, but it also changes CodeQL scope/config (adds tests/** to paths-ignore, switches to a custom config file, and tweaks matrix/build-mode). If this is intentional, please document it in the PR description; otherwise consider moving the CodeQL changes to a separate PR to keep review/audit history focused.
on:
  push:
    branches: [ "master" ]
    paths-ignore:
      - 'docs/**'
      - 'tests/**'
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "master" ]
    paths-ignore:
      - 'docs/**'
      - 'tests/**'
  schedule:

@AndreaCuneo
AndreaCuneo merged commit 0a52e9c into master Aug 14, 2026
9 checks passed
@AndreaCuneo
AndreaCuneo deleted the copilot/fix-dotnet-tests-reporting branch August 14, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants