mirror of https://github.com/dotnet/tye.git
Browse Source
* Add buildArgs to service configuration and capture build configuration as global property to setup msbuild project
* Fix format
* Fix - Error CS8600: Converting null literal or possible null value to non-nullable type.
* Improve configuration format for build arguments
* Fix whitespace format
* Fix error CS8618: Non-nullable property 'Properties' is uninitialized. Consider declaring the property as nullable.
* Fix error CS8601: Possible null reference assignment.
* Translate non first class properties as /p:{Key}={Value} into the build command
* Fix property translation
* All properties are used to create the msbuild project
* Change the name (to BuildProperties) and the type (to List<BuildProperty>) of ConfigService property to load build properties
* Add support of build properties when tye run with --docker option
* Fix ComprehensionalTest
* Add tests to verify the output directory for the corresponding build configuration
* Fix whitespace format
* Override the correct CreateTestCasesForTheory to fix error CS0618
* Remove the usage of BuildPropertiesToOptionsMap and fix the code format
pull/396/head
committed by
GitHub
17 changed files with 216 additions and 21 deletions
@ -0,0 +1,17 @@ |
|||
// Licensed to the .NET Foundation under one or more agreements.
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
|||
// See the LICENSE file in the project root for more information.
|
|||
|
|||
using System.ComponentModel.DataAnnotations; |
|||
|
|||
namespace Microsoft.Tye.ConfigModel |
|||
{ |
|||
public class BuildProperty |
|||
{ |
|||
[Required] |
|||
public string Name { get; set; } = default!; |
|||
|
|||
[Required] |
|||
public string Value { get; set; } = default!; |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
// Licensed to the .NET Foundation under one or more agreements.
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
|||
// See the LICENSE file in the project root for more information.
|
|||
|
|||
using System; |
|||
using Xunit; |
|||
using Xunit.Sdk; |
|||
|
|||
namespace E2ETest |
|||
{ |
|||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] |
|||
[XunitTestCaseDiscoverer("E2ETest." + nameof(ConditionalTheoryDiscoverer), "Microsoft.Tye.E2ETest")] |
|||
public class ConditionalTheoryAttribute : TheoryAttribute |
|||
{ |
|||
} |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
// Licensed to the .NET Foundation under one or more agreements.
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
|||
// See the LICENSE file in the project root for more information.
|
|||
|
|||
using System.Collections.Generic; |
|||
|
|||
using Xunit.Abstractions; |
|||
using Xunit.Sdk; |
|||
|
|||
namespace E2ETest |
|||
{ |
|||
internal class ConditionalTheoryDiscoverer : TheoryDiscoverer |
|||
{ |
|||
private readonly IMessageSink _diagnosticMessageSink; |
|||
|
|||
public ConditionalTheoryDiscoverer(IMessageSink diagnosticMessageSink) |
|||
: base(diagnosticMessageSink) |
|||
{ |
|||
_diagnosticMessageSink = diagnosticMessageSink; |
|||
} |
|||
|
|||
protected override IEnumerable<IXunitTestCase> CreateTestCasesForTheory( |
|||
ITestFrameworkDiscoveryOptions discoveryOptions, |
|||
ITestMethod testMethod, |
|||
IAttributeInfo theoryAttribute) |
|||
{ |
|||
var skipReason = testMethod.EvaluateSkipConditions(); |
|||
return skipReason != null |
|||
? new IXunitTestCase[] |
|||
{ |
|||
new SkippedTestCase( |
|||
skipReason, |
|||
_diagnosticMessageSink, |
|||
discoveryOptions.MethodDisplayOrDefault(), |
|||
TestMethodDisplayOptions.None, |
|||
testMethod) |
|||
} |
|||
: base.CreateTestCasesForTheory(discoveryOptions, testMethod, theoryAttribute); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,14 @@ |
|||
# tye application configuration file |
|||
# read all about it at https://github.com/dotnet/tye |
|||
name: frontend-backend |
|||
services: |
|||
- name: backend |
|||
project: backend/backend.csproj |
|||
buildProperties: |
|||
- name: Configuration |
|||
value: Debug |
|||
- name: frontend |
|||
project: frontend/frontend.csproj |
|||
buildProperties: |
|||
- name: Configuration |
|||
value: Debug |
|||
@ -0,0 +1,14 @@ |
|||
# tye application configuration file |
|||
# read all about it at https://github.com/dotnet/tye |
|||
name: frontend-backend |
|||
services: |
|||
- name: backend |
|||
project: backend/backend.csproj |
|||
buildProperties: |
|||
- name: Configuration |
|||
value: Release |
|||
- name: frontend |
|||
project: frontend/frontend.csproj |
|||
buildProperties: |
|||
- name: Configuration |
|||
value: Release |
|||
Loading…
Reference in new issue