Skip to content

Commit 151e31e

Browse files
chore: refactoring CI and test on more java version (#1193)
1 parent 41d749d commit 151e31e

7 files changed

Lines changed: 28 additions & 31 deletions

File tree

.github/workflows/run-codebuild-ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
platform:
3737
- distribution: corretto
3838
image: "aws/codebuild/standard:7.0"
39-
version: [ 8, 11 ]
39+
version: [ 8, 11, 17, 21 ]
4040
steps:
4141
- name: Configure AWS Credentials
4242
uses: aws-actions/configure-aws-credentials@v3
@@ -49,5 +49,9 @@ jobs:
4949
timeout-minutes: 60
5050
with:
5151
project-name: java-ddb-ec
52-
buildspec-override: codebuild/${{ matrix.platform.distribution }}${{ matrix.version }}.yml
52+
buildspec-override: codebuild/corretto.yml
5353
image-override: ${{ matrix.platform.image }}
54+
env-vars-for-codebuild: |
55+
JAVA_VERSION
56+
env:
57+
JAVA_VERSION: ${{ matrix.version }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 0.2
33
phases:
44
install:
55
runtime-versions:
6-
java: corretto11
6+
java: corretto$JAVA_VERSION
77
build:
88
commands:
99
- mvn install

codebuild/corretto8.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

codebuild/openjdk11.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

codebuild/openjdk8.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

sdk1/pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@
153153
<type>pom</type>
154154
<scope>import</scope>
155155
</dependency>
156+
<dependency>
157+
<groupId>org.mockito</groupId>
158+
<artifactId>mockito-core</artifactId>
159+
<version>4.11.0</version>
160+
<scope>test</scope>
161+
</dependency>
156162
</dependencies>
157163
</dependencyManagement>
158164

@@ -260,6 +266,19 @@
260266
<version>4.13.2</version>
261267
<scope>test</scope>
262268
</dependency>
269+
270+
<dependency>
271+
<groupId>org.mockito</groupId>
272+
<artifactId>mockito-core</artifactId>
273+
<scope>test</scope>
274+
</dependency>
275+
276+
<dependency>
277+
<groupId>org.mockito</groupId>
278+
<artifactId>mockito-inline</artifactId>
279+
<version>4.11.0</version>
280+
<scope>test</scope>
281+
</dependency>
263282
</dependencies>
264283

265284
<!--Custom repository:-->
@@ -333,6 +352,7 @@
333352
<version>${maven-surefire-plugin.version}</version>
334353
<configuration>
335354
<useSystemClassLoader>false</useSystemClassLoader>
355+
<argLine>-Dnet.bytebuddy.experimental=true</argLine>
336356
<includes>
337357
<include>**/Test*.java</include>
338358
<include>**/*Test.java</include>

sdk1/src/test/java/com/amazonaws/services/dynamodbv2/datamodeling/internal/TTLCacheTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
package com.amazonaws.services.dynamodbv2.datamodeling.internal;
44

5-
import static org.mockito.Matchers.any;
5+
import static org.mockito.ArgumentMatchers.any;
66
import static org.mockito.Mockito.mock;
77
import static org.mockito.Mockito.spy;
88
import static org.mockito.Mockito.times;

0 commit comments

Comments
 (0)