From 740ed633419cc6d69684282db79c2e19b0a41e48 Mon Sep 17 00:00:00 2001 From: TechCeo Date: Mon, 13 Jul 2026 21:19:21 -0400 Subject: [PATCH 1/2] CI setup issues --- .github/workflows/ci.yml | 15 ++++++++--- README.md | 4 +-- pom.xml | 26 +++++++++++++++++++ .../TransactionIntegrationTest.java | 2 +- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02660d7..0a2a03c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,14 +15,14 @@ jobs: build: name: Build and verify runs-on: ubuntu-latest - timeout-minutes: 45 + timeout-minutes: 60 steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v7 - name: Set up Java 21 - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: distribution: temurin java-version: '21' @@ -31,5 +31,14 @@ jobs: - name: Make Maven Wrapper executable run: chmod +x mvnw + - name: Pre-pull Oracle test image + run: | + for attempt in 1 2 3; do + docker pull gvenzl/oracle-free:slim-faststart && exit 0 + echo "Oracle image pull failed on attempt ${attempt}; retrying..." + sleep 20 + done + exit 1 + - name: Verify with Maven run: ./mvnw --batch-mode clean verify diff --git a/README.md b/README.md index f0f00dc..c22d96c 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ The `test` profile uses an in-memory H2 database in Oracle compatibility mode so .\mvnw.cmd clean verify ``` -`clean verify` includes a Testcontainers-backed Oracle integration test. Docker must be running locally. +`clean test` runs the fast unit and WebMvc slice tests. `clean verify` also runs the Failsafe integration-test phase, including a Testcontainers-backed Oracle Free integration test. Docker must be running locally. ## Docker Compose @@ -96,7 +96,7 @@ GitHub Actions runs on every push and pull request to `main`: .github/workflows/ci.yml ``` -The workflow uses Java 21, Maven dependency caching, Docker-enabled Ubuntu runners, and `./mvnw --batch-mode clean verify`. +The workflow uses Java 21, Maven dependency caching, Docker-enabled Ubuntu runners, a pre-pulled Oracle Free test image, and `./mvnw --batch-mode clean verify`. ## Local Run diff --git a/pom.xml b/pom.xml index 91bd4d3..16d3646 100644 --- a/pom.xml +++ b/pom.xml @@ -111,6 +111,32 @@ + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IntegrationTest.java + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + **/*IntegrationTest.java + + + + + + integration-test + verify + + + + diff --git a/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java b/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java index 45c7c95..195ce71 100644 --- a/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java +++ b/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java @@ -28,7 +28,7 @@ class TransactionIntegrationTest { private static final DockerImageName ORACLE_IMAGE = DockerImageName - .parse("gvenzl/oracle-free:23-slim") + .parse("gvenzl/oracle-free:slim-faststart") .asCompatibleSubstituteFor("gvenzl/oracle-xe"); @Container From 9eea4277f69fee5dbe4098672b8dfd47c0845005 Mon Sep 17 00:00:00 2001 From: TechCeo Date: Mon, 13 Jul 2026 21:32:43 -0400 Subject: [PATCH 2/2] Fix CI Issues --- .github/workflows/ci.yml | 2 +- README.md | 6 +++--- .../merchantapi/transaction/TransactionIntegrationTest.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a2a03c..70899f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - name: Pre-pull Oracle test image run: | for attempt in 1 2 3; do - docker pull gvenzl/oracle-free:slim-faststart && exit 0 + docker pull gvenzl/oracle-xe:21-slim-faststart && exit 0 echo "Oracle image pull failed on attempt ${attempt}; retrying..." sleep 20 done diff --git a/README.md b/README.md index c22d96c..14dcb9d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Merchant API is a Spring Boot REST service for managing merchants and their paym - Oracle JDBC for local and production-style runtime - Flyway for SQL database migrations - H2 for test execution -- Testcontainers with Oracle Free for integration testing +- Testcontainers with Oracle XE for integration testing - Springdoc OpenAPI / Swagger UI - Docker Compose with Oracle Free - Maven Wrapper @@ -76,7 +76,7 @@ The `test` profile uses an in-memory H2 database in Oracle compatibility mode so .\mvnw.cmd clean verify ``` -`clean test` runs the fast unit and WebMvc slice tests. `clean verify` also runs the Failsafe integration-test phase, including a Testcontainers-backed Oracle Free integration test. Docker must be running locally. +`clean test` runs the fast unit and WebMvc slice tests. `clean verify` also runs the Failsafe integration-test phase, including a Testcontainers-backed Oracle XE integration test. Docker must be running locally. ## Docker Compose @@ -96,7 +96,7 @@ GitHub Actions runs on every push and pull request to `main`: .github/workflows/ci.yml ``` -The workflow uses Java 21, Maven dependency caching, Docker-enabled Ubuntu runners, a pre-pulled Oracle Free test image, and `./mvnw --batch-mode clean verify`. +The workflow uses Java 21, Maven dependency caching, Docker-enabled Ubuntu runners, a pre-pulled Oracle XE test image, and `./mvnw --batch-mode clean verify`. ## Local Run diff --git a/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java b/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java index 195ce71..c6d0d35 100644 --- a/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java +++ b/src/test/java/com/portfolio/merchantapi/transaction/TransactionIntegrationTest.java @@ -28,7 +28,7 @@ class TransactionIntegrationTest { private static final DockerImageName ORACLE_IMAGE = DockerImageName - .parse("gvenzl/oracle-free:slim-faststart") + .parse("gvenzl/oracle-xe:21-slim-faststart") .asCompatibleSubstituteFor("gvenzl/oracle-xe"); @Container