Skip to content

Enable TUnit test report artifact upload in GitHub Actions#902

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/remove-deprecated-report-html-flag
Draft

Enable TUnit test report artifact upload in GitHub Actions#902
Copilot wants to merge 2 commits intomainfrom
copilot/remove-deprecated-report-html-flag

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

TUnit can automatically upload HTML test reports as workflow artifacts and link them in the step summary when running in GitHub Actions — but only if ACTIONS_RUNTIME_TOKEN is available to the shell process, which it isn't by default (it's only exposed inside JS/Docker action handlers).

Changes

  • Added an "Expose GitHub Actions Runtime" step using actions/github-script@v7 immediately before the dotnet test step in both workflow files:
    • .github/workflows/PR-Build-And-Test.yml
    • .github/workflows/Build-Test-And-Deploy.yml
- name: Expose GitHub Actions Runtime
  uses: actions/github-script@v7
  with:
    script: |
      core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
      core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);

- name: Run .NET Tests
  run: dotnet test ...

With this in place, TUnit will upload the test report as a workflow artifact and add a direct link to it in the step summary on each run.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ifact upload

Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove deprecated --report-html flag from TUnit Enable TUnit test report artifact upload in GitHub Actions Mar 6, 2026
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.

2 participants