Skip to content

Commit 95d40de

Browse files
committed
ci: onboard the repo on the testing infra
1 parent 214f1e8 commit 95d40de

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

buildtools/ci.buildspec.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 0.2
2+
3+
env:
4+
variables:
5+
DOTNET_RUNNING_IN_CONTAINER: "true"
6+
phases:
7+
install:
8+
runtime-versions:
9+
dotnet: 8.x
10+
build:
11+
commands:
12+
- dotnet test --verbosity normal test/Amazon.Common.DotNetCli.Tools.Test/Amazon.Common.DotNetCli.Tools.Test.csproj --configuration Release --logger trx --results-directory ./testresults
13+
- dotnet test --verbosity normal test/Amazon.ECS.Tools.Test/Amazon.ECS.Tools.Test.csproj --configuration Release --logger trx --results-directory ./testresults
14+
- dotnet test --verbosity normal test/Amazon.Lambda.Tools.Test/Amazon.Lambda.Tools.Test.csproj --configuration Release --logger trx --results-directory ./testresults
15+
- dotnet test --verbosity normal test/Amazon.ElasticBeanstalk.Tools.Test/Amazon.ElasticBeanstalk.Tools.Test.csproj --configuration Release --logger trx --results-directory ./testresults
16+
reports:
17+
aws-dotnet-messaging-tests:
18+
file-format: VisualStudioTrx
19+
files:
20+
- '**/*'
21+
base-directory: './testresults'

test/Amazon.Lambda.Tools.Test/LayerTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ public async Task CreateLayer()
100100
// mock the underlying calls to the dotnet CLI.
101101
public async Task AttemptToCreateAnOptmizedLayer()
102102
{
103+
if (string.Equals(System.Environment.GetEnvironmentVariable("DOTNET_RUNNING_IN_CONTAINER"), "true", StringComparison.OrdinalIgnoreCase) &&
104+
RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
105+
{
106+
_testOutputHelper.WriteLine("Skipping test as the optimize feature does not work in CI on Linux.");
107+
_testOutputHelper.WriteLine("https://github.com/aws/aws-extensions-for-dotnet-cli/issues/208");
108+
return;
109+
}
103110
var logger = new TestToolLogger(_testOutputHelper);
104111
var assembly = this.GetType().GetTypeInfo().Assembly;
105112

0 commit comments

Comments
 (0)