Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1.1k
Helix proof of concept for unit tests#224
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
6300d4280679a9d78d7e57965f0cd8c0f446feb911491809a5d54a79cbdea61ae4f6d6782b66887131662a0880488f2af992bcf5946768624e60f0a285cec44b78c5a5105634304a18185302d76ac7fb77d93112aec20f50b63f18999a276576178d5ccec95d76c67eccb81debba1040e1de8c75f0e35c86a55dfa4ad3c73e90fcfd534d8f548dd25028a6051837a4c7ac78750aa3dc52f62ee5b33b41b63f1cc0a15d338769b9225df3114fdb412e08ef95a81e7b7b617ff2ef77b2fe058f73cf164c9637808b3b210d447b54cfd51df9f5e1cf65b6afb86a566bea6c10e9fe6264dfede315fffd5eebea07c03eba4c5f1f97d3f1a28440c9cdcfab7ce198d9049663bcaacdbdac6d4043ead2db0e73c01462fdd5374f4f2141f2ff2f6a180132f19545a08d9936e7bcbed7e8f8b6032c5599d0b79237aee9de8753c2de3d5a444ed716c3ca47fff8ab79587File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| parameters: | ||
| # All parameters are required for our purposes (except HelixType); see send-to-helix.yml for details | ||
| RepoName: '' | ||
| HelixType: 'tests/default' | ||
| HelixTargetQueues: '' | ||
| HelixAccessToken: '' | ||
| XUnitProjects: '' | ||
| DisplayNamePrefix: '' | ||
| steps: | ||
| - template: /eng/common/templates/steps/send-to-helix.yml | ||
| parameters: | ||
| HelixSource: ${{ parameters.RepoName }} | ||
| HelixType: ${{ parameters.HelixType }} | ||
| HelixBuild: $(Build.BuildNumber) | ||
| HelixTargetQueues: ${{ parameters.HelixTargetQueues }} | ||
| HelixAccessToken: ${{ parameters.HelixAccessToken }} # only defined for internal CI | ||
| Creator: ${{ parameters.RepoName }} # required for public / external (when there is no access token) | ||
| XUnitProjects: ${{ parameters.XUnitProjects }} | ||
| XUnitPublishTargetFramework: netcoreapp3.0 # Whatever tfm will work for our test projects for `dotnet publish` | ||
| XUnitRuntimeTargetFramework: netcoreapp2.0 # Whatever tfm to pick from the xunit package, it must exist in that package or the helix job will fail | ||
| XUnitRunnerVersion: '2.4.1' # Should match XUnitRunnerConsoleVersion in eng/Versions.props | ||
| IncludeDotNetCli: true | ||
| DotNetCliPackageType: 'sdk' | ||
| DotNetCliVersion: '3.0.100-preview-010184' # MUST be official release: https://dotnet.microsoft.com/download/dotnet-core/3.0 ; does not need to match sdk we build against | ||
| EnableXUnitReporter: true | ||
| WaitForWorkItemCompletion: true | ||
| DisplayNamePrefix: ${{ parameters.DisplayNamePrefix }} | ||
| condition: succeeded() | ||
| continueOnError: false | ||
Tanya-Solyanik marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -34,15 +34,15 @@ public static Process StartProcess(string byPathFromBinToExe) | ||
| throw new ArgumentException(nameof(byPathFromBinToExe) + " must end in a .exe"); | ||
| } | ||
| var dotnetPath = DotNetPath(); | ||
| if (!Directory.Exists(dotnetPath)) | ||
| { | ||
| throw new DirectoryNotFoundException(dotnetPath + " directory cannot be found."); | ||
| var dotnetPath = DotNetPath(); | ||
| if (!Directory.Exists(dotnetPath)) | ||
| { | ||
| throw new DirectoryNotFoundException(dotnetPath + " directory cannot be found."); | ||
| } | ||
| ProcessStartInfo startInfo = new ProcessStartInfo(); | ||
| startInfo.FileName = Path.Combine(BinPath(), byPathFromBinToExe.Trim('\\')); | ||
| startInfo.EnvironmentVariables["DOTNET_ROOT"] = dotnetPath; | ||
| startInfo.EnvironmentVariables["DOTNET_ROOT"] = dotnetPath; // required | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding the reason why this is required. Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If only I remembered 😆 ... I'll figure it out
| ||
| // ... | ||
| return StartProcess(startInfo); | ||
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.
With java applications we usually had a separate file to keep the version numbers that we are depending on in one place. Is it a best practice in dotnet apps as well? Can we move the dependencies version number into one place. I know it’s complitaced because of the different usage and file formats and all, just it would be nice to have dotner version, dotnet path, helix version, dotnet arcade version, xunit version, etc all in one place possibly grouped by what is using them, build, test, unit test, etc. Do es it makes sense?
I have no idea how hard it would be to do it? Would it worth 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.
unfortunately, the yml files are the very first files run on the CI so build-time variables are not available yet, and for local builds these yml files are not run at all. I do not think there is a great place for them all.