Skip to content

Commit a9ac42e

Browse files
authored
Merge pull request #699 from hjgraca/aot-e2e-tests
chore: Add Aot e2e tests for x86
2 parents cef7dd6 + 2b8515b commit a9ac42e

File tree

4 files changed

+89
-100
lines changed

4 files changed

+89
-100
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 38 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -50,54 +50,37 @@ jobs:
5050
cd libraries/tests/e2e/infra
5151
cdk deploy --require-approval never
5252
53-
# deploy-aot-stack:
54-
# runs-on: ubuntu-latest
55-
# strategy:
56-
# fail-fast: false
57-
# matrix:
58-
# architecture: [ x86_64, arm64 ]
59-
# steps:
60-
# - name: Checkout code
61-
# uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
62-
#
63-
# - name: Configure AWS credentials
64-
# uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
65-
# with:
66-
# role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
67-
# aws-region: us-east-1
68-
#
69-
# - name: Set up .NET
70-
# uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
71-
# with:
72-
# dotnet-version: '8.x'
73-
#
74-
# - name: Install CDK
75-
# run: npm install -g aws-cdk
76-
#
77-
# - name: Install AWS Lambda .NET CLI Tools
78-
# run: dotnet tool install -g Amazon.Lambda.Tools
79-
#
80-
# - name: Set up QEMU
81-
# uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a
82-
# with:
83-
# platforms: ${{ matrix.architecture }}
84-
#
85-
# - name: Set up Docker Buildx
86-
# id: builder
87-
# uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
88-
# with:
89-
# install: true
90-
# driver: docker
91-
# platforms: linux/amd64,linux/arm64
92-
#
93-
# - name: Deploy AOT Stack
94-
# run: |
95-
# cd libraries/tests/e2e/infra-aot
96-
# cdk deploy -c architecture=${{ matrix.architecture }} --require-approval never
53+
deploy-aot-stack:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
58+
59+
- name: Configure AWS credentials
60+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
61+
with:
62+
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
63+
aws-region: us-east-1
64+
65+
- name: Set up .NET
66+
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3
67+
with:
68+
dotnet-version: '8.x'
69+
70+
- name: Install CDK
71+
run: npm install -g aws-cdk
72+
73+
- name: Install AWS Lambda .NET CLI Tools
74+
run: dotnet tool install -g Amazon.Lambda.Tools
75+
76+
- name: Deploy AOT Stack x86_64
77+
run: |
78+
cd libraries/tests/e2e/infra-aot
79+
cdk deploy -c architecture=x86_64 --require-approval never
9780
9881
run-tests:
9982
runs-on: ubuntu-latest
100-
needs: deploy-stack
83+
needs: [deploy-stack,deploy-aot-stack]
10184
steps:
10285
- name: Checkout code
10386
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
@@ -117,7 +100,12 @@ jobs:
117100
- name: Run Core Tests
118101
run: |
119102
cd libraries/tests/e2e/functions/core
120-
dotnet test
103+
dotnet test --filter Category!=AOT
104+
105+
- name: Run Core AOT Tests
106+
run: |
107+
cd libraries/tests/e2e/functions/core
108+
dotnet test --filter Category=AOT
121109
122110
destroy-stack:
123111
runs-on: ubuntu-latest
@@ -145,45 +133,7 @@ jobs:
145133
cd libraries/tests/e2e/infra
146134
cdk destroy --force
147135
148-
# destroy-aot-stack:
149-
# runs-on: ubuntu-latest
150-
# needs: run-tests
151-
# if: always()
152-
# strategy:
153-
# fail-fast: false
154-
# matrix:
155-
# architecture: [ x86_64, arm64 ]
156-
# steps:
157-
# - name: Checkout code
158-
# uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
159-
#
160-
# - name: Configure AWS credentials
161-
# uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
162-
# with:
163-
# role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
164-
# aws-region: us-east-1
165-
# mask-aws-account-id: true
166-
#
167-
# - name: Install CDK
168-
# run: npm install -g aws-cdk
169-
#
170-
# - name: Install AWS Lambda .NET CLI Tools
171-
# run: dotnet tool install -g Amazon.Lambda.Tools
172-
#
173-
# - name: Set up QEMU
174-
# uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a
175-
# with:
176-
# platforms: ${{ matrix.architecture }}
177-
#
178-
# - name: Set up Docker Buildx
179-
# id: builder
180-
# uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
181-
# with:
182-
# install: true
183-
# driver: docker
184-
# platforms: linux/amd64,linux/arm64
185-
#
186-
# - name: Destroy Core AOT Stack
187-
# run: |
188-
# cd libraries/tests/e2e/infra-aot
189-
# cdk destroy -c architecture=${{ matrix.architecture }} --force
136+
- name: Destroy AOT Core Stack
137+
run: |
138+
cd libraries/tests/e2e/infra-aot
139+
cdk destroy -c architecture=x86_64 --force

libraries/tests/e2e/functions/core/logging/Function/test/Function.Tests/FunctionTest.cs renamed to libraries/tests/e2e/functions/core/logging/Function/test/Function.Tests/FunctionTests.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,37 @@
99
namespace Function.Tests;
1010

1111
[Trait("Category", "E2E")]
12-
public class FunctionTest
12+
public class FunctionTests
1313
{
1414
private readonly ITestOutputHelper _testOutputHelper;
1515
private readonly AmazonLambdaClient _lambdaClient;
1616

17-
public FunctionTest(ITestOutputHelper testOutputHelper)
17+
public FunctionTests(ITestOutputHelper testOutputHelper)
1818
{
1919
_testOutputHelper = testOutputHelper;
2020
_lambdaClient = new AmazonLambdaClient();
2121
}
22+
23+
[Trait("Category", "AOT")]
24+
[Theory]
25+
[InlineData("E2ETestLambda_X64_AOT_NET8_logging")]
26+
// [InlineData("E2ETestLambda_ARM_AOT_NET8_metrics")]
27+
public async Task AotFunctionTest(string functionName)
28+
{
29+
await TestFunction(functionName);
30+
}
2231

2332
[Theory]
2433
[InlineData("E2ETestLambda_X64_NET6_logging")]
2534
[InlineData("E2ETestLambda_ARM_NET6_logging")]
2635
[InlineData("E2ETestLambda_X64_NET8_logging")]
2736
[InlineData("E2ETestLambda_ARM_NET8_logging")]
28-
// [InlineData("E2ETestLambda_ARM_AOT_NET8_logging")]
29-
public async Task TestFunction(string functionName)
37+
public async Task FunctionTest(string functionName)
38+
{
39+
await TestFunction(functionName);
40+
}
41+
42+
internal async Task TestFunction(string functionName)
3043
{
3144
var request = new InvokeRequest
3245
{

libraries/tests/e2e/functions/core/metrics/Function/test/Function.Tests/FunctionTest.cs renamed to libraries/tests/e2e/functions/core/metrics/Function/test/Function.Tests/FunctionTests.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,37 @@
99
namespace Function.Tests;
1010

1111
[Trait("Category", "E2E")]
12-
public class FunctionTest
12+
public class FunctionTests
1313
{
1414
private readonly ITestOutputHelper _testOutputHelper;
1515
private readonly AmazonLambdaClient _lambdaClient;
1616

17-
public FunctionTest(ITestOutputHelper testOutputHelper)
17+
public FunctionTests(ITestOutputHelper testOutputHelper)
1818
{
1919
_testOutputHelper = testOutputHelper;
2020
_lambdaClient = new AmazonLambdaClient();
2121
}
2222

23+
[Trait("Category", "AOT")]
24+
[Theory]
25+
[InlineData("E2ETestLambda_X64_AOT_NET8_metrics")]
26+
// [InlineData("E2ETestLambda_ARM_AOT_NET8_metrics")]
27+
public async Task AotFunctionTest(string functionName)
28+
{
29+
await TestFunction(functionName);
30+
}
31+
2332
[Theory]
2433
[InlineData("E2ETestLambda_X64_NET6_metrics")]
2534
[InlineData("E2ETestLambda_ARM_NET6_metrics")]
2635
[InlineData("E2ETestLambda_X64_NET8_metrics")]
2736
[InlineData("E2ETestLambda_ARM_NET8_metrics")]
28-
// [InlineData("E2ETestLambda_ARM_AOT_NET8_metrics")]
29-
public async Task TestFunction(string functionName)
37+
public async Task FunctionTest(string functionName)
38+
{
39+
await TestFunction(functionName);
40+
}
41+
42+
internal async Task TestFunction(string functionName)
3043
{
3144
var request = new InvokeRequest
3245
{

libraries/tests/e2e/functions/core/tracing/Function/test/Function.Tests/FunctionTest.cs renamed to libraries/tests/e2e/functions/core/tracing/Function/test/Function.Tests/FunctionTests.cs

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,40 @@
99
namespace Function.Tests;
1010

1111
[Trait("Category", "E2E")]
12-
public class FunctionTest
12+
public class FunctionTests
1313
{
1414
private readonly ITestOutputHelper _testOutputHelper;
1515
private readonly AmazonLambdaClient _lambdaClient;
1616

17-
public FunctionTest(ITestOutputHelper testOutputHelper)
17+
public FunctionTests(ITestOutputHelper testOutputHelper)
1818
{
1919
_testOutputHelper = testOutputHelper;
2020
_lambdaClient = new AmazonLambdaClient(new AmazonLambdaConfig
2121
{
2222
Timeout = TimeSpan.FromSeconds(7)
2323
});
2424
}
25+
26+
[Trait("Category", "AOT")]
27+
[Theory]
28+
[InlineData("E2ETestLambda_X64_AOT_NET8_tracing")]
29+
// [InlineData("E2ETestLambda_ARM_AOT_NET8_tracing")]
30+
public async Task AotFunctionTest(string functionName)
31+
{
32+
await TestFunction(functionName);
33+
}
2534

2635
[Theory]
2736
[InlineData("E2ETestLambda_X64_NET6_tracing")]
2837
[InlineData("E2ETestLambda_ARM_NET6_tracing")]
2938
[InlineData("E2ETestLambda_X64_NET8_tracing")]
3039
[InlineData("E2ETestLambda_ARM_NET8_tracing")]
31-
// [InlineData("E2ETestLambda_ARM_AOT_NET8_tracing")]
32-
public async Task TestToUpperFunction(string functionName)
40+
public async Task FunctionTest(string functionName)
41+
{
42+
await TestFunction(functionName);
43+
}
44+
45+
internal async Task TestFunction(string functionName)
3346
{
3447
var request = new InvokeRequest
3548
{

0 commit comments

Comments
 (0)