Skip to content

Update dotnet-ci workflow to use dotnet ci tool - #4

Merged
CTristan merged 3 commits into
mainfrom
update-dotnet-ci-to-use-ci-tool
Apr 14, 2026
Merged

Update dotnet-ci workflow to use dotnet ci tool#4
CTristan merged 3 commits into
mainfrom
update-dotnet-ci-to-use-ci-tool

Conversation

@CTristan

Copy link
Copy Markdown
Member

Summary

  • Replaced manual restore/build/test steps with dotnet tool restore + dotnet ci --check, which runs CSharpier formatting checks, tests with Coverlet coverage, and coverage threshold verification
  • Added PACKAGES_TOKEN secret for cross-org GitHub Packages auth (falls back to github.token)
  • Removed inputs handled by the CI tool: solution-file, collect-coverage, coverage-files, upload-codecov, upload-codacy
  • Removed nested ci-windows job (repos can call dotnet-ci-windows.yml directly)

Test plan

  • Merge this PR
  • Verify CTristan/lobotomy-corporation-mods CI passes using the updated reusable workflow (PR incoming)

Replaced manual restore/build/test steps with `dotnet tool restore` +
`dotnet ci --check`, which runs CSharpier formatting checks, tests with
Coverlet coverage, and coverage threshold verification.

Removed inputs that are now handled by the CI tool: solution-file,
collect-coverage, coverage-files, upload-codecov, upload-codacy.

Added PACKAGES_TOKEN secret for cross-org GitHub Packages authentication,
falling back to github.token for same-org repos.

Removed nested ci-windows job since repos can call
dotnet-ci-windows.yml directly when needed.

Copilot AI left a comment

Copy link
Copy Markdown

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 updates the org-wide reusable Linux .NET CI workflow to delegate build/test/format/coverage checks to the repository’s dotnet ci --check tooling instead of running explicit dotnet restore/build/test and coverage-upload steps.

Changes:

  • Removes solution-file and coverage upload-related workflow_call inputs/secrets, replacing them with dotnet tool restore + dotnet ci --check.
  • Adds an optional PACKAGES_TOKEN secret and uses it (with fallback to github.token) for GitHub Packages authentication.
  • Removes the nested Windows job so consumer repos must call the Windows workflow directly.
Comments suppressed due to low confidence (1)

.github/workflows/dotnet-ci.yml:31

  • Dropping the nested Windows job means this reusable workflow now only runs on Ubuntu; consumers that previously relied on the implicit ci-windows run will silently lose Windows coverage unless they update their pipelines to call dotnet-ci-windows.yml separately. If the intent is to preserve Windows CI by default, consider keeping an optional Windows job behind an input flag (defaulting on), or ensure there’s an explicit migration path documented for all callers.
jobs:
  ci:
    name: CI
    runs-on: ubuntu-latest
    steps:

Comment thread .github/workflows/dotnet-ci.yml
Comment thread .github/workflows/dotnet-ci.yml Outdated
Emit a clear migration error when consumer repos lack .config/dotnet-tools.json so the failure points at the fix instead of an opaque restore error.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/dotnet-ci.yml
Surfaces an actionable error when the local tool manifest exists but
does not include the required dotnet-ci tool, instead of letting the
downstream dotnet ci invocation fail with a less clear message.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@CTristan
CTristan merged commit fbc42dc into main Apr 14, 2026
5 checks passed
@CTristan
CTristan deleted the update-dotnet-ci-to-use-ci-tool branch April 14, 2026 23:24
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