Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 21, 2025

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original issue description:

Show unit test results on Pull Requests comments.

When the GitHub Action CI is executed publish the unit test results summary as a pull request comment

For that add a Junit report to jest and then publish those results as a pull request comment using a GitHub Action

If possible publish those results as well in Azure Pipelines (both pull request and push to default branch)

Fixes #11.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@tspascoal
Copy link
Owner

@copilot please try again

Co-authored-by: tspascoal <7847935+tspascoal@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jul 21, 2025

@copilot please try again

I've implemented the unit test results reporting as requested in issue #11. The solution includes:

  • Jest configured to generate JUnit XML reports
  • GitHub Actions workflow updated to publish test results as PR comments using dorny/test-reporter
  • Azure Pipelines configuration updated to publish test results using PublishTestResults@2 task
  • Added necessary permissions for the GitHub Action to work properly

The implementation is now ready for testing. Changes are in commit 33e7c82.

Copilot finished work on behalf of tspascoal July 21, 2025 16:10
@tspascoal
Copy link
Owner

@copilot This is great. Can you please update the README.md to reflect the CI changes that were made?

Co-authored-by: tspascoal <7847935+tspascoal@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jul 21, 2025

@copilot This is great. Can you please update the README.md to reflect the CI changes that were made?

I've updated the README.md to document the CI changes for unit test results reporting. The updated Continuous Integration section now explains how both GitHub Actions and Azure Pipelines publish test results, including the Jest JUnit XML configuration. Changes are in commit 5f30df3.

Copilot finished work on behalf of tspascoal July 21, 2025 16:16
@tspascoal
Copy link
Owner

@copilot Great. Test reporting is working, now please do the same for code coverage

Co-authored-by: tspascoal <7847935+tspascoal@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jul 21, 2025

@copilot Great. Test reporting is working, now please do the same for code coverage

I've implemented code coverage reporting for both GitHub Actions and Azure Pipelines, following the same pattern as test results reporting. The implementation includes:

  • Jest configured with Cobertura XML format for CI integration
  • GitHub Actions workflow updated with 5monkeys/cobertura-action for PR coverage comments
  • Azure Pipelines workflow updated with PublishCodeCoverageResults@1 task
  • README.md documentation updated to explain coverage reporting features

Coverage reports are published even if tests fail, providing visibility into coverage metrics alongside test results. Changes are in commit ed76abc.

Copilot finished work on behalf of tspascoal July 21, 2025 18:42
@github-actions
Copy link

github-actions bot commented Jul 21, 2025

File Coverage Lines Branches
All files 96% 99% 93%
github-service.ts 98% 100% 97%
proxy-config.ts 93% 96% 90%
post.ts 81% 96% 66%
run.ts 97% 99% 96%

Minimum allowed coverage is 80%

Generated by 🐒 cobertura-action against 539cd42

@tspascoal tspascoal marked this pull request as ready for review July 21, 2025 20:30
Copilot AI review requested due to automatic review settings July 21, 2025 20:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements unit test and code coverage reporting for both GitHub Actions and Azure Pipelines CI workflows. The changes add JUnit XML test reporting and Cobertura coverage reporting to provide visibility into test results and coverage metrics in pull request comments and CI dashboards.

  • Configures Jest to output JUnit XML format for test results and Cobertura XML format for coverage reports
  • Adds GitHub Actions workflow steps to publish test results as PR comments using dorny/test-reporter and coverage results using 5monkeys/cobertura-action
  • Adds Azure Pipelines tasks to publish test results and coverage reports in the pipeline dashboard

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
create-github-app-token/package.json Adds jest-junit dependency and reorganizes devDependencies
create-github-app-token/jest.config.js Configures JUnit XML reporting and adds Cobertura coverage format
azure-pipelines.yml Adds tasks to publish test results and code coverage in Azure Pipelines
README.md Documents the new test reporting and coverage features in CI workflows
.github/workflows/ci.yml Adds GitHub Actions steps for test and coverage reporting with required permissions
Files not reviewed (1)
  • create-github-app-token/package-lock.json: Language not supported

@tspascoal tspascoal merged commit d176749 into main Jul 21, 2025
6 checks passed
@tspascoal tspascoal deleted the copilot/fix-11 branch July 21, 2025 20:31
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.

Report Unit tests results

2 participants