Update dotnet-ci workflow to use dotnet ci tool - #4
Merged
Conversation
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.
3 tasks
There was a problem hiding this comment.
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-fileand coverage upload-relatedworkflow_callinputs/secrets, replacing them withdotnet tool restore+dotnet ci --check. - Adds an optional
PACKAGES_TOKENsecret and uses it (with fallback togithub.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-windowsrun will silently lose Windows coverage unless they update their pipelines to calldotnet-ci-windows.ymlseparately. 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:
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dotnet tool restore+dotnet ci --check, which runs CSharpier formatting checks, tests with Coverlet coverage, and coverage threshold verificationPACKAGES_TOKENsecret for cross-org GitHub Packages auth (falls back togithub.token)solution-file,collect-coverage,coverage-files,upload-codecov,upload-codacyci-windowsjob (repos can calldotnet-ci-windows.ymldirectly)Test plan