Skip to content

Commit

Permalink
Backport to branch(3.11) : [CI] Add integration test for MariaDB 11.4…
Browse files Browse the repository at this point in the history
… and Oracle 19 (#2132)
  • Loading branch information
Torch3333 authored Aug 1, 2024
1 parent ef8bb80 commit 13c91f2
Showing 1 changed file with 57 additions and 12 deletions.
69 changes: 57 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -758,25 +758,19 @@ jobs:
name: postgresql_15_integration_test_reports
path: core/build/reports/tests/integrationTestJdbc

integration-test-for-jdbc-oracle-18:
name: Oracle 18 integration test
integration-test-for-jdbc-oracle-19:
name: Oracle 19 integration test
runs-on: ubuntu-latest

services:
oracle:
image: ghcr.io/scalar-labs/oracle/db-prebuilt:18
image: ghcr.io/scalar-labs/oracle/db-prebuilt:19
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
env:
ORACLE_PWD: Oracle
ports:
- 1521:1521
options: >-
--health-cmd "/opt/oracle/checkDBStatus.sh"
--health-interval 10s
--health-timeout 5s
--health-retries 120

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -811,13 +805,13 @@ jobs:
- name: Setup and execute Gradle 'integrationTestJdbc' task
uses: gradle/gradle-build-action@v2
with:
arguments: integrationTestJdbc -Dscalardb.jdbc.url=jdbc:oracle:thin:@//localhost:1521/XEPDB1 -Dscalardb.jdbc.username=SYSTEM -Dscalardb.jdbc.password=Oracle
arguments: integrationTestJdbc -Dscalardb.jdbc.url=jdbc:oracle:thin:@//localhost:1521/ORCLPDB1 -Dscalardb.jdbc.username=SYSTEM -Dscalardb.jdbc.password=Oracle

- name: Upload Gradle test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: oracle_18_integration_test_reports
name: oracle_19_integration_test_reports
path: core/build/reports/tests/integrationTestJdbc

integration-test-for-jdbc-oracle-21:
Expand Down Expand Up @@ -1245,6 +1239,57 @@ jobs:
name: mariadb_10_integration_test_reports
path: core/build/reports/tests/integrationTestJdbc

integration-test-for-jdbc-mariadb-11-4:
name: MariaDB 11.4 integration test
runs-on: ubuntu-latest

steps:
- name: Run MariaDB 11.4
run: |
docker run -e MYSQL_ROOT_PASSWORD=mysql -p 3306:3306 -d mariadb:11.4 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
- uses: actions/checkout@v4

- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_VENDOR }}

- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}) to run integration test
uses: actions/setup-java@v4
if: ${{ env.SET_UP_INT_TEST_RUNTIME_JDK_WHEN_NOT_ORACLE_8_OR_11 == 'true'}}
with:
java-version: ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}
distribution: ${{ env.INT_TEST_JAVA_RUNTIME_VENDOR }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Set up JDK ${{ env.INT_TEST_JAVA_RUNTIME_VERSION }} (oracle) to run the integration test
if: ${{ env.SET_UP_INT_TEST_RUNTIME_ORACLE_JDK_8_OR_11 == 'true'}}
run: |
container_id=$(docker create "ghcr.io/scalar-labs/oracle/jdk:${{ env.INT_TEST_JAVA_RUNTIME_VERSION }}-linux")
docker cp "$container_id:oracle-jdk.tar.gz" . && docker rm "$container_id"
tar -xzf oracle-jdk.tar.gz -C /usr/lib/jvm
- name: Setup and execute Gradle 'integrationTestJdbc' task
uses: gradle/gradle-build-action@v3
with:
arguments: integrationTestJdbc

- name: Upload Gradle test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: mariadb_11.4_integration_test_reports
path: core/build/reports/tests/integrationTestJdbc

integration-test-for-multi-storage:
name: Multi-storage integration test
runs-on: ubuntu-latest
Expand Down

0 comments on commit 13c91f2

Please sign in to comment.