Skip to content

SG-38126 Review and Fixups CI Tests and Code Coverage#73

Merged
julien-lang merged 14 commits intomasterfrom
ticket/SG-38126-review-and-fixup-code-coverage
Jan 28, 2026
Merged

SG-38126 Review and Fixups CI Tests and Code Coverage#73
julien-lang merged 14 commits intomasterfrom
ticket/SG-38126-review-and-fixup-code-coverage

Conversation

@julien-lang
Copy link
Copy Markdown
Member

@julien-lang julien-lang commented Jan 13, 2026

Improve Test Results and Code Coverage reports. Make sure they are properly passed to Azure Pipelines and Codecov.io

Align with other repositories:

Implemented by:

Azure Pipeline CI Improvements

  • Define job parameter in the "formal" form without a default value to make sure CI fails if the parameters are not provided
  • Attempt to make the playbook easier to read
  • Simplify the code coverage upload mechanism to codecov.io
  • Drop pytest-azurepipeline
    • This package was prviously used to automatically upload test report and code coverage to Azure Pipelines which is very convenient.
    • Unfortunately, the package does not seem to be maintained anymore. And it is using outdated versions the PublishTestResults and PublishCodeCoverageResults Azure Pipeline tasks.
  • Ensure all test results and code coverage are combine and send
    • tk-core and tk-framework-desktopserver have additional tests runnings which produce result and coverage files.

@julien-lang julien-lang requested a review from Copilot January 13, 2026 16:58
Copy link
Copy Markdown

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 PR enhances the CI/CD pipeline's code coverage reporting and test execution infrastructure. It modernizes the testing workflow by replacing pytest-azurepipelines with explicit pytest plugins, implements OS-specific codecov uploader URLs, and consolidates coverage upload logic across all platforms.

Changes:

  • Replaced pytest-azurepipelines with individual pytest plugins (pytest, pytest-cov, pytest-nunit)
  • Added OS-specific codecov download URLs to centralize platform handling
  • Unified code coverage upload workflow using Azure Pipeline tasks instead of OS-specific bash/powershell scripts

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
internal/run-tests.yml Added codecov download URLs for each OS platform with macOS pinned to v0.7.3 due to architecture constraints
internal/run-tests-with.yml Refactored test execution and coverage reporting to use unified Azure Pipeline tasks and explicit pytest plugins
README.md Added codecov.io coverage status badge

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/run-tests-with.yml Outdated
Comment thread internal/run-tests-with.yml Outdated
Comment thread internal/run-tests-with.yml Outdated
Copy link
Copy Markdown
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk left a comment

Choose a reason for hiding this comment

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

LGTM. Although I shared some questions here and there.

QT_QPA_PLATFORM: offscreen
DISPLAY: ':99.0'

TK_DEBUG: 1
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.

Nice ⭐

displayName: Publish code coverage
inputs:
summaryFileLocation: coverage.xml
failIfCoverageEmpty: true
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.

Is this going to affect any other repos where coverage is not updated yet?

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.

All repos using tk-ci-tools will generate coverage because the command is made in this same file.
If the repos does not have a tests/ folder, then, this playbook is not called.

Comment thread internal/run-tests.yml
vm_image: macOS-14
codecov_download_url: https://uploader.codecov.io/v0.7.3/macos/codecov
# macOS & codecov note:
# In Nov 2024 (SG-36700), we pinned macOS to codecov v0.7.3 because the
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.

It's also worth considering mentioning SG-36012 as well.

@julien-lang julien-lang merged commit cd26bce into master Jan 28, 2026
22 checks passed
@julien-lang julien-lang deleted the ticket/SG-38126-review-and-fixup-code-coverage branch January 28, 2026 17:12
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