ci: install required .NET SDKs explicitly #98
Merged
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.
CI/CD workflows: setup-dotnet action
With PR #96 (postcondition: standard error output stream is empty) we require not only the .NET 8.0 SDK to be installed locally, but also the reference assemblies of other frameworks that our tests target (currently .NET 7.0 & .NET 6.0).
On my machine I had only the .NET 8.0 SDK and the .NET Core 3.1 SDK installed, and the new postcondition failed:
In order to not rely on the preinstalled software of the GitHub-hosted runners, and mirror my current local setup, let's install the dependencies explicitly.
As a side effect, we are also installing the latest .NET SDK as per
global.json
.Previously the exact
version
was installed, disregarding therollForward
.From Job ubuntu-22_04:
Version of NuGet.Packaging for integration tests
However, using the latest .NET SDK (currently SDK 8.0.204) also requires updating the package
NuGet.Packaging
to a compatible version (e.g.v6.9.1
) forinterceptor list
integration tests to succeed. It would be tedious to keep the version ofNuGet.Packaging
in sync with the latest .NET SDK manually.i.e.
Where
6.7.1
is compatible with the .NET SDK7.0.4nn
,and
6.12.*
will be compatible with the upcoming .NET SDK9.0.100
(unless Microsoft will release a new major version of Visual Studio for .NET 9.0, so18.0
instead of17.12
, in which case the major version of the NuGet packages will also be incremented to7.0.*
).So I'm proposing the version range
[6.*,6.12.0)
, where open/close brackets[]
are inclusive, open/close parentheses()
are exclusive, and the asterisk*
resolves to the highest version available, therefore resolving to the latest compatible version for all feature bands within the .NET 8.0 release cycle.This way developers may have any non-preview .NET 8.0 SDK installed, in accordance with our
global.json
, and still be able to successfully run theinterceptor list
integration tests locally. And CI/CD should be fine selecting the latest patch version of the .NET 8.0 SDK and also succeed.See Package versioning
See global.json overview
Also ... I think this is the first time I am writing more documentation than actual code 😉.