Skip to content

Commit b29f144

Browse files
authored
Exclude endpoint provider tests to speed up the build (#4860)
* Exclude endpoint provider tests to speed up the build * Update CI and add buildspec for endpoints test * Fix cloudformation template
1 parent 40cd0e1 commit b29f144

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

.github/workflows/codebuild-ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,17 @@ jobs:
120120
env:
121121
PR: ${{ github.event.number }}
122122
BRANCH: ${{ github.head_ref || 'master'}}
123-
BASE: ${{ github.base_ref }}
123+
BASE: ${{ github.base_ref }}
124+
endpoints-tests:
125+
runs-on: ubuntu-latest
126+
steps:
127+
- name: Configure AWS Credentials
128+
uses: aws-actions/configure-aws-credentials@v1
129+
with:
130+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
131+
aws-region: us-west-2
132+
role-duration-seconds: 7200
133+
- name: Run endpoints test
134+
uses: aws-actions/aws-codebuild-run-build@v1
135+
with:
136+
project-name: aws-sdk-java-v2-endpoints-test

buildspecs/endpoints-test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
runtime-versions:
6+
java: "$JAVA_RUNTIME"
7+
8+
build:
9+
commands:
10+
- mvn clean install -P endpoint-tests -T1C $MAVEN_OPTIONS
11+
finally:
12+
- mkdir -p codebuild-test-reports
13+
- find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;
14+
reports:
15+
IntegTests:
16+
files:
17+
- 'codebuild-test-reports/**/*'

buildspecs/resources/ci.cloudformation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Resources:
5656
- !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-JDK8-windows
5757
- !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-native-image-test
5858
- !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-sonar
59+
- !Sub arn:aws:codebuild:${ AWS::Region }:${ AWS::AccountId }:project/aws-sdk-java-v2-endpoints-test
5960
- Effect: Allow
6061
Action:
6162
- logs:GetLogEvents
@@ -67,6 +68,7 @@ Resources:
6768
- !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-JDK8-windows:*
6869
- !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-native-image-test:*
6970
- !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-sonar:*
71+
- !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/codebuild/aws-sdk-java-v2-endpoints-test:*
7072

7173
GithubOidc:
7274
Type: AWS::IAM::OIDCProvider

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@
270270
<exclude>**/*IntegrationTests.java</exclude>
271271
<exclude>**/*IntegTest.java</exclude>
272272
<exclude>**/*IntegrationTestCase.java</exclude>
273+
<exclude>**/*ClientEndpointTests.java</exclude>
274+
<exclude>**/*EndpointProviderTests.java</exclude>
273275
</excludes>
274276
<includes>
275277
<include>**/Test*.java</include>

0 commit comments

Comments
 (0)