Skip to content

Add GitHub Actions workflow for Update Dependencies Tests with TRX artifact upload#6688

Merged
lbussell merged 9 commits into
nightlyfrom
copilot/fix-7652d94e-f08f-4785-99c9-305999f9c4c1
Sep 29, 2025
Merged

Add GitHub Actions workflow for Update Dependencies Tests with TRX artifact upload#6688
lbussell merged 9 commits into
nightlyfrom
copilot/fix-7652d94e-f08f-4785-99c9-305999f9c4c1

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 26, 2025

Fixes #6669

This PR adds a new GitHub Actions workflow to run the UpdateDependencies.Tests in PR validation, as requested in the issue.

What's Added

A new workflow .github/workflows/update-dependencies-tests.yml that:

  • Triggers automatically on pull requests that modify:

    • eng/update-dependencies/** (the update-dependencies tool)
    • tests/UpdateDependencies.Tests/** (the test project)
    • The workflow file itself
  • Runs focused tests using standard .NET commands:

    • dotnet restore to get dependencies
    • dotnet build to compile the test project
    • dotnet test to execute only the UpdateDependencies.Tests (no other repo tests)
  • Publishes test results with TRX artifact upload:

    • Generates TRX test result files using --logger trx
    • Uploads TRX files as artifacts for download using actions/upload-artifact@v4
  • Uses minimal resources with ubuntu-latest runner and .NET 9.0.x setup via actions/setup-dotnet@v4

Why This Approach

Following the discussion in the issue comments, this uses GitHub Actions (not Azure Pipelines) since:

  • The scope is small and focused
  • No need to run during unofficial builds
  • Matches the pattern used in dotnet-buildtools-prereqs-docker
  • Provides fast feedback for changes to the update-dependencies tool

The workflow follows the same security and formatting patterns as existing workflows in the repository, using only GitHub-created actions with minimal permissions and proper YAML structure.

This ensures that any changes to the update-dependencies tool or its tests are automatically validated in PRs with TRX test results available as downloadable artifacts, improving code quality and catching issues early.

Original prompt

This section details on the original issue you should resolve

<issue_title>Update dependencies tests should run in PR validation</issue_title>
<issue_description>#6668 added a new test project for the eng/update-dependencies tool. It lives in tests/UpdateDependencies.Tests. Those tests should run in PR validation.

Spec:

  • There should be a new GitHub action/workflow called "Update Dependencies Tests"
  • It should trigger whenever a pull request is created that modifies any of the following files:
    • eng/update-dependencies/*
    • tests/UpdateDependencies.Tests/*
    • The workflow file itself
  • The workflow should install .NET and run dotnet test on the UpdateDependencies.Tests project only.
  • The workflow shouldn't run any other tests in the repo.</issue_description>

Comments on the Issue (you are @copilot in this section)

@lbussell @MichaelSimons @mthalman what are your opinions on GH Actions vs. Azure pipelines for this? I lean towards Actions, [similar to dotnet-buildtools-prereqs-docker](https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/main/.github/workflows/run-tests.yml). The scope is small and there is no point running these tests during unofficial builds as it won't affect the outcome. @lbussell Closely related: https://github.com//issues/6478 @MichaelSimons I don't see any issues w/this approach.
Fixes #6687

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 26, 2025 16:01
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Copilot AI changed the title [WIP] Update dependencies tests should run in PR validation Add GitHub Actions workflow for Update Dependencies Tests Sep 26, 2025
Copilot AI requested a review from lbussell September 26, 2025 16:08
@lbussell lbussell requested a review from Copilot September 26, 2025 16:30
Copy link
Copy Markdown
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 PR adds a GitHub Actions workflow to automatically run UpdateDependencies.Tests in PR validation, as requested in issue #6669. The workflow ensures that changes to the update-dependencies tool are properly tested during pull request validation.

  • Adds a new GitHub Actions workflow that triggers on relevant file changes
  • Implements focused testing using standard .NET commands (restore, build, test)
  • Uses minimal resources with ubuntu-latest runner and .NET 9.0.x setup

@lbussell lbussell marked this pull request as ready for review September 26, 2025 16:30
@lbussell lbussell requested a review from a team as a code owner September 26, 2025 16:30
@lbussell lbussell enabled auto-merge (squash) September 26, 2025 17:06
@lbussell lbussell requested a review from mthalman September 26, 2025 17:29
Comment thread .github/workflows/update-dependencies-tests.yml
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
auto-merge was automatically disabled September 26, 2025 18:36

Head branch was pushed to by a user without write access

Copilot AI changed the title Add GitHub Actions workflow for Update Dependencies Tests Add GitHub Actions workflow for Update Dependencies Tests with TRX publishing Sep 26, 2025
Copilot AI requested a review from lbussell September 26, 2025 18:37
Comment thread .github/workflows/update-dependencies-tests.yml Outdated
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Copilot AI changed the title Add GitHub Actions workflow for Update Dependencies Tests with TRX publishing Add GitHub Actions workflow for Update Dependencies Tests with TRX artifact upload Sep 26, 2025
Copilot AI requested a review from lbussell September 26, 2025 19:49
@lbussell lbussell requested a review from mthalman September 26, 2025 20:13
@lbussell lbussell merged commit 1a6d864 into nightly Sep 29, 2025
108 checks passed
lbussell added a commit to lbussell/dotnet-docker that referenced this pull request Oct 9, 2025
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
lbussell added a commit that referenced this pull request Oct 9, 2025
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Co-authored-by: Logan Bussell <loganbussell@microsoft.com>
@lbussell lbussell deleted the copilot/fix-7652d94e-f08f-4785-99c9-305999f9c4c1 branch October 16, 2025 18:33
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