Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

GitHub Actions cannot authenticate to internal Azure DevOps artifact feeds required for MSAL test execution. The existing pr-msal.yml pipeline (definitionId=1328) already runs tests with proper authentication on every PR.

Changes

azure-pipelines/pull-request-validation/pr-msal.yml

  • Added Jacoco coverage generation after unit tests
  • Added PublishCodeCoverageResults@1 task to publish coverage to Azure DevOps
- task: Gradle@2
  displayName: Generate Code Coverage Report
  inputs:
    tasks: msal:localDebugMsalUnitTestCoverageReport -PcodeCoverageEnabled=true
    
- task: PublishCodeCoverageResults@1
  displayName: Publish Code Coverage Results
  inputs:
    codeCoverageTool: 'JaCoCo'
    summaryFileLocation: '$(Build.SourcesDirectory)/msal/build/reports/jacoco/...'

.github/workflows/code-coverage.yml

  • Disabled (renamed to .code-coverage.yml.disabled)
  • Cannot function without Azure DevOps authentication

.github/workflows/CODE_COVERAGE_README.md

  • Documents where coverage is now generated
  • Links to Azure Pipeline 1328

Coverage Location

Coverage reports are available in Azure DevOps pipeline runs under the "Code Coverage" tab.

Original prompt

Implement a required GitHub Actions check called 'code-coverage' that runs only for PRs targeting the 'dev' branch. The check must:

  • Run code coverage (using Jacoco) on both the current PR branch and the latest dev branch.
  • Compare total code coverage percentage between dev and the PR branch, and compute the delta.
  • If code coverage decreases (delta < 0), the check fails with an error message showing before/after coverage and delta.
  • If coverage increases or is unchanged, the check passes with a success message showing before/after and delta.
  • If the PR has a label 'code-coverage-skip', the check is skipped and passes regardless of delta.
  • Add clear output in the check for all outcomes.

This must use default Gradle/Jacoco configuration for Android projects. Only enable for PRs merging into the dev branch. All code and configuration must belong in the 'dev' branch for review.

This pull request was created from Copilot chat.


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

Copilot AI changed the title [WIP] Add GitHub Actions check for code coverage Add code-coverage GitHub Actions workflow for PRs to dev branch Jan 16, 2026
Copilot AI requested a review from fadidurah January 16, 2026 05:53
Copilot AI changed the title Add code-coverage GitHub Actions workflow for PRs to dev branch Confirm code-coverage workflow already supports label-triggered reruns Jan 16, 2026
@fadidurah fadidurah marked this pull request as ready for review January 16, 2026 16:11
@fadidurah fadidurah requested a review from a team as a code owner January 16, 2026 16:11
Copilot AI review requested due to automatic review settings January 16, 2026 16:11
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 confirms that the code-coverage workflow already supports label-triggered reruns without requiring additional implementation. The PR clarifies that the existing workflow configuration includes both labeled and unlabeled event types in the pull_request trigger, enabling automatic re-execution when the code-coverage-skip label is added or removed.

Changes:

  • Added comprehensive GitHub Actions workflow for code coverage checking on PRs targeting the dev branch
  • Implemented dual-job pattern with separate jobs for running coverage checks and handling skip scenarios
  • Integrated Jacoco-based coverage comparison between PR branch and dev branch with clear pass/fail criteria

@github-actions
Copy link

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

@github-actions
Copy link

📊 Code Coverage Report

❓ UNKNOWN

Branch Coverage Delta
dev (baseline) 0.0% -
PR branch 0.0% 0.0%

This check can be skipped by adding the code-coverage-skip label to the PR.

@github-actions
Copy link

✅ Code Coverage Report

✅ PASSED

Branch Coverage Delta
dev (baseline) 0.0% -
PR branch 0.0% 0.00%

Code coverage maintained at 0.0%.


This check can be skipped by adding the code-coverage-skip label to the PR.

Copilot AI changed the title Confirm code-coverage workflow already supports label-triggered reruns Fix code coverage reporting returning 0.0% due to silent failures Jan 16, 2026
@github-actions
Copy link

✅ Code Coverage Report

✅ PASSED

Branch Coverage Delta
dev (baseline) 0.0% -
PR branch 0.0% 0.00%

Code coverage maintained at 0.0%.


This check can be skipped by adding the code-coverage-skip label to the PR.

- Ensure gradle.properties ends with newline before appending
- Check for existing properties to avoid duplicates
- Add better logging for gradle.properties setup

This fixes the error: 'Provider com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImplvstsUsername=dummy not found'
which occurred when appending properties without proper newline separation.
Copilot AI changed the title Fix code coverage reporting returning 0.0% due to silent failures Fix gradle.properties malformation causing build failure and 0.0% coverage Jan 16, 2026
@github-actions
Copy link

✅ Code Coverage Report

✅ PASSED

Branch Coverage Delta
dev (baseline) 0.0% -
PR branch 0.0% 0.00%

Code coverage maintained at 0.0%.


This check can be skipped by adding the code-coverage-skip label to the PR.

- Add code coverage generation to pr-msal.yml Azure Pipeline
- Disable GitHub Actions code-coverage.yml workflow
- Add documentation explaining the change

The GitHub Actions workflow cannot access internal Azure DevOps artifact feeds
required for running MSAL tests. The Azure Pipeline already runs tests with
proper authentication, so we add coverage generation there instead.

Co-authored-by: fadidurah <[email protected]>
Copilot AI changed the title Fix gradle.properties malformation causing build failure and 0.0% coverage Move code coverage from GitHub Actions to Azure Pipeline Jan 20, 2026
@fadidurah fadidurah requested a review from a team as a code owner January 20, 2026 18:45
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.

4 participants