-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Support unit testing NB.GV on Ubuntu 20.04/.NET 3.1 #522
Support unit testing NB.GV on Ubuntu 20.04/.NET 3.1 #522
Conversation
/azp run |
No pipelines are associated with this pull request. |
/azp run |
No pipelines are associated with this pull request. |
I am not. .NET Core 2.1 SDK is still under LTS so I want to keep supporting it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you have looks fine. But can you modify the Azure Pipeline to actually run the tests on Ubuntu 20 to 'lock in' your work?
Also: this PR fails the build (which I had to kick off manually). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. But check this build for failures.
Closer... Windows builds now but linux still has a build break. |
another build given your latest push. I really wish AzP would fix their bug and auto-trigger. |
@AArnott Thanks. I configured Azure Pipelines to run on my fork, so I can trigger my own builds (hence the additional Azure DevOps CI for GitHub PRs runs fine on projects I maintain. I wonder whether the failure to trigger builds on PR requests is related to the The Linux task now fails like this:
Anything that's immediately obvious to you? |
Is your service connection between Azure DevOps and GitHub based on OAuth or the Azure Pipelines GitHub App? Mine is the latter, and generally provides a superior experience. But I wonder if switching to OAuth for now would fix it. |
I'm attempting to get
dotnet test
for the NerdBank.GitVersioning solution itself to work on Ubuntu 20.04 + .NET Core 3.1, since I want to run the unit tests for #521 locally.Loading LibGit2Sharp fails because:
GitLoaderContext
, but the unit tests do not execute within the scope of theGitLoaderContext
.I didn't see a straightforward way to replicate the
ContextAwareTask
approach to unit tests, so I usedNativeLibrary.SetDllImportResolver
instead.PS -
NativeLibrary
is available starting with .NET Core 3.0, so if you're fine having nbgv target at least .NET Core 3.0, we can get rid of theGitLoaderContext
/ContextAwareTask
and use theNativeLibrary.SetDllImportResolver
approach instead.