Skip to content

Commit 79ff186

Browse files
committed
chore: add e2e integration tests
1 parent 69f01bb commit 79ff186

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: E2E Tests
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
paths:
9+
- 'sdk/**'
10+
- 'sdk-testing/**'
11+
- 'sdk-integration-tests/**'
12+
- 'examples/**'
13+
- 'pom.xml'
14+
push:
15+
branches:
16+
- main
17+
paths:
18+
- 'sdk/**'
19+
- 'sdk-testing/**'
20+
- 'sdk-integration-tests/**'
21+
- 'examples/**'
22+
- 'pom.xml'
23+
24+
# permission can be added at job level or workflow level
25+
permissions:
26+
id-token: write # This is required for requesting the JWT
27+
contents: read # This is required for actions/checkout
28+
29+
jobs:
30+
e2e-tests:
31+
if: github.event_name == 'pull_request'
32+
env:
33+
AWS_REGION: us-west-2
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
java:
38+
- 17
39+
- 21
40+
- 25
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v5
44+
- name: Setup Java ${{ matrix.java }}
45+
uses: actions/setup-java@v5
46+
with:
47+
distribution: corretto
48+
java-version: ${{ matrix.java }}
49+
cache: maven
50+
- name: Setup AWS SAM CLI
51+
uses: aws-actions/setup-sam@v2
52+
with:
53+
use-installer: true
54+
# token: ${{ secrets.GITHUB_TOKEN }} # only enable if we run into throughput issues
55+
- name: Build and test
56+
run: mvn -B -q install --file pom.xml
57+
- name: Configure AWS credentials
58+
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
59+
with:
60+
role-to-assume: "${{ secrets.ACTIONS_INTEGRATION_ROLE_NAME }}"
61+
role-session-name: java-language-sdk-test
62+
aws-region: ${{ env.AWS_REGION }}
63+
- name: Cloud Based Integration Tests
64+
run: |
65+
sam build
66+
sam deploy --resolve-image-repos
67+
mvn clean test -B -q -Dtest.cloud.enabled=true -Dtest=CloudBasedIntegrationTest
68+
with:
69+
path: examples/

0 commit comments

Comments
 (0)