Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/run-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run end-to-end tests

on:
workflow_dispatch:

push:
branches: [master]
Comment thread
jeromevdl marked this conversation as resolved.
Outdated
paths: # add other modules when there are under e2e tests
Comment thread
jeromevdl marked this conversation as resolved.
- 'powertools-e2e-tests/**'
- 'powertools-core/**'
- 'powertools-serialization/**'
- 'powertools-logging/**'
- 'powertools-tracing/**'
- 'powertools-idempotency/**'
- 'powertools-metrics/**'
- 'pom.xml'
- '.github/workflows/**'

jobs:
e2e:
Comment thread
jeromevdl marked this conversation as resolved.
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
java: [ 8, 11, 17 ]
name: End-to-end tests java${{ matrix.java }}
env:
JAVA_VERSION: ${{ matrix.java }}
AWS_DEFAULT_REGION: eu-west-1
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: ${{ matrix.java }}
cache: maven
- name: Setup AWS credentials
uses: aws-actions/configure-aws-credentials@v1.6.1
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN_TO_ASSUME }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Run e2e test with Maven
run: mvn -Pe2e -B verify --file powertools-e2e-tests/pom.xml
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.7</version>
<version>1.3.7</version>
Comment thread
jeromevdl marked this conversation as resolved.
Outdated
Comment thread
jeromevdl marked this conversation as resolved.
Outdated
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion powertools-e2e-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.4.7</version>
<version>1.3.7</version>
Comment thread
jeromevdl marked this conversation as resolved.
Outdated
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import java.time.Year;
import java.util.Collections;
import java.util.UUID;
import java.util.concurrent.TimeUnit;

import static software.amazon.lambda.powertools.testutils.lambda.LambdaInvoker.invokeFunction;
Expand All @@ -21,11 +22,12 @@ public class IdempotencyE2ET {
@BeforeAll
@Timeout(value = 5, unit = TimeUnit.MINUTES)
public static void setup() {
String random = UUID.randomUUID().toString().substring(0, 6);
infrastructure = Infrastructure.builder()
.testName(IdempotencyE2ET.class.getSimpleName())
.pathToFunction("idempotency")
.idempotencyTable("idempo")
.environmentVariables(Collections.singletonMap("IDEMPOTENCY_TABLE", "idempo"))
.idempotencyTable("idempo" + random)
.environmentVariables(Collections.singletonMap("IDEMPOTENCY_TABLE", "idempo" + random))
.build();
functionName = infrastructure.deploy();
}
Expand Down