Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

fix: optimize sdk-test-java Docker build to reduce CI time (#500)

Hector Venturac67216065f3b
diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml
index 6f1ec76778..8bbcc08797 100644
--- a/.github/workflows/compatibility.yml
+++ b/.github/workflows/compatibility.yml
@@ -73,7 +73,7 @@ jobs:
test:
- sdk-test-node
- sdk-test-python
- - sdk-test-java
+ - sdk-test-java # improving execution time
- sdk-test-go
- sdk-test-awscli
- compat-cdk
diff --git a/compatibility-tests/sdk-test-java/Dockerfile b/compatibility-tests/sdk-test-java/Dockerfile
index 14a62f9df0..bb7a3f7aec 100644
--- a/compatibility-tests/sdk-test-java/Dockerfile
+++ b/compatibility-tests/sdk-test-java/Dockerfile
@@ -1,14 +1,13 @@
-FROM eclipse-temurin:17-jdk
+FROM maven:3.9-eclipse-temurin-17
WORKDIR /app
-RUN apt-get update && apt-get install -y maven && rm -rf /var/lib/apt/lists/*
-
COPY pom.xml .
RUN mvn dependency:go-offline -q
COPY src/ src/
+RUN mvn test-compile -q
ENV FLOCI_ENDPOINT=http://floci:4566
RUN mkdir -p /results
-ENTRYPOINT ["bash", "-c", "status=0; mvn test -q -Dorg.slf4j.simpleLogger.defaultLogLevel=warn || status=$?; if [ -d target/surefire-reports ]; then ls -la target/surefire-reports/; cp target/surefire-reports/TEST-*.xml /results/ 2>/dev/null || true; else echo 'No surefire-reports directory found'; fi; exit $status"]
+ENTRYPOINT ["bash", "-c", "status=0; mvn test -q -Dorg.slf4j.simpleLogger.defaultLogLevel=warn || status=$?; if [ -d target/surefire-reports ]; then cp target/surefire-reports/TEST-*.xml /results/ 2>/dev/null || true; fi; exit $status"]