Visitar URL original
[3.0] Get test reports and coverage comments working for forks by Exanite · Pull Request #2645 · dotnet/Silk.NET · GitHub
Skip to content

[3.0] Get test reports and coverage comments working for forks - #2645

Draft
Exanite wants to merge 10 commits into
dotnet:develop/3.0from
Exanite-Dev:feature/3.0-code-coverage-for-forks
Draft

Exanite wants to merge 10 commits into
dotnet:develop/3.0from
Exanite-Dev:feature/3.0-code-coverage-for-forks

Conversation

@Exanite

@Exanite Exanite commented Nov 14, 2026

Copy link
Copy Markdown
Member

Summary of the PR

This PR makes it so that test reports and coverage comments work for forks. Because this shares a similar pattern with the bindings/native workflows, I also added reusable workflows for posting/getting the required PR number.

  • I confirm that I am the author of this code and release it to the Silk.NET project under the MIT license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Related issues, Discord discussions, or proposals

N/A

Further Comments

These changes were tested here: Exanite-Dev#6

path: coverage/**/*.cobertura.xml
if-no-files-found: error

report-coverage:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Moved to main branch as a workflow_run triggered workflow.

@@ -0,0 +1,29 @@
# This is intended for use alongside pr-get-number.reusable.yml (see main branch)
name: Post PR number

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Apparently there's no way to specify the branch/ref to use when referencing using the $/.github/workflows/pr-post-number.reusable.yml syntax.

For example, $/.github/workflows/pr-post-number.reusable.yml@main gives the error:

A '$/' self repository reference cannot specify an '@ref'.

I also don't want to hard code the repo since that makes it harder for contributors to edit the workflow.
Using ${{ github.repository }} in the reference also doesn't work.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant