Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Test on .NET 5.0 #835

Merged
merged 3 commits into from
Dec 27, 2020
Merged

[CI] Test on .NET 5.0 #835

merged 3 commits into from
Dec 27, 2020

Conversation

ChrisMaddock
Copy link
Member

Fixes #830 and also fixes #511

This runs the tests on .NET 5.0, where available. I thought this was important to at least test on .NET 5.0, as it's a platform I suspect a large number of our users will shortly be running on. I haven't yet seen any reason to add a .NET 5.0 build though - so this instead runs tests for the .NET Core 3.1 Engine/Console on .NET 5.0. I also didn't see a need to add a requirement for users to have .NET 5.0 installed to contribute, so if unavailable, the default is to provide a warning - assuming the tests will be run on all platforms in CI instead.

It also improves the CI's handling of .NET Core platforms, as per #511. The new behaviour:

  • The Cake script will now locate the most appropriate runtime for the request - that being the highest major/minor version installed for the runtime requested. e.g. on my machine, the 3.1 tests will chose to run on 3.1.5 over 3.1.2.
  • If a runtime isn't available, e.g. .NET 5.0:
    • When building locally through the Cake scripts, if a certain runtime isn't available the script will provide a warning.
    • When building in CI and a certain runtime isn't available, the script will error. This is with various known exceptions built in, such as the .NET Core 1.1 test running on Azure.

One day I hope the Engine itself will do all this boilerplate stuff for us...we'll get there! 😄

@ChrisMaddock ChrisMaddock changed the title [CI] Test on under .NET 5.0 [CI] Test on .NET 5.0 Nov 22, 2020
Copy link
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

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

LGTM. I've got a couple of questions/comments.

build.cake Outdated Show resolved Hide resolved
@ChrisMaddock
Copy link
Member Author

Thanks Mikkel! I'll come back and fix up the problems at the weekend. 😄

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.

[CI] Test on .NET 5.0 [Build] Improve detection of installed .NET Core Runtimes
2 participants