-
Notifications
You must be signed in to change notification settings - Fork 998
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
Helix proof of concept for unit tests #224
Changes from all commits
6300d42
80679a9
d78d7e5
7965f0c
d8c0f44
6feb911
491809a
5d54a79
cbdea61
ae4f6d6
782b668
8713166
2a08804
88f2af9
92bcf59
4676862
4e60f0a
285cec4
4b78c5a
5105634
304a181
85302d7
6ac7fb7
7d93112
aec20f5
0b63f18
999a276
576178d
5ccec95
d76c67e
ccb81de
bba1040
e1de8c7
5f0e35c
86a55df
a4ad3c7
3e90fcf
d534d8f
548dd25
028a605
1837a4c
7ac7875
0aa3dc5
2f62ee5
b33b41b
63f1cc0
a15d338
769b922
5df3114
fdb412e
08ef95a
81e7b7b
617ff2e
f77b2fe
058f73c
f164c96
37808b3
b210d44
7b54cfd
51df9f5
e1cf65b
6afb86a
566bea6
c10e9fe
6264dfe
de315ff
fd5eebe
a07c03e
ba4c5f1
f97d3f1
a28440c
9cdcfab
7ce198d
9049663
bcaacdb
dac6d40
43ead2d
b0e73c0
1462fdd
5374f4f
2141f2f
f2f6a18
0132f19
545a08d
9936e7b
cbed7e8
f8b6032
c5599d0
b79237a
ee9de87
53c2de3
d5a444e
d716c3c
a47fff8
ab79587
File filter
Filter by extension
Conversations
Jump to
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.
Show resolved
Hide resolved
|
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 | ||
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. 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 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. Right, this is why you want to explain comments like this one :). Maybe for the integration tests? |
||
// ... | ||
|
||
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.