Skip to content

Commit 87e30b1

Browse files
committed
Use PostgreSQL in CI by default
1 parent bf49281 commit 87e30b1

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ jobs:
461461
uses: gradle/actions/setup-gradle@v4
462462

463463
- name: Execute Gradle 'integrationTestJdbc' task
464-
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
464+
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mysql://localhost:3306/ -Dscalardb.jdbc.username=root -Dscalardb.jdbc.password=mysql ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
465465

466466
- name: Upload Gradle test reports
467467
if: always()
@@ -520,7 +520,7 @@ jobs:
520520
uses: gradle/actions/setup-gradle@v4
521521

522522
- name: Execute Gradle 'integrationTestJdbc' task
523-
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
523+
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mysql://localhost:3306/ -Dscalardb.jdbc.username=root -Dscalardb.jdbc.password=mysql ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
524524

525525
- name: Upload Gradle test reports
526526
if: always()
@@ -579,7 +579,7 @@ jobs:
579579
uses: gradle/actions/setup-gradle@v4
580580

581581
- name: Execute Gradle 'integrationTestJdbc' task
582-
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
582+
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mysql://localhost:3306/ -Dscalardb.jdbc.username=root -Dscalardb.jdbc.password=mysql ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
583583

584584
- name: Upload Gradle test reports
585585
if: always()
@@ -643,7 +643,7 @@ jobs:
643643
uses: gradle/actions/setup-gradle@v4
644644

645645
- name: Execute Gradle 'integrationTestJdbc' task
646-
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:postgresql://localhost:5432/ -Dscalardb.jdbc.username=postgres -Dscalardb.jdbc.password=postgres ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
646+
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
647647

648648
- name: Upload Gradle test reports
649649
if: always()
@@ -707,7 +707,7 @@ jobs:
707707
uses: gradle/actions/setup-gradle@v4
708708

709709
- name: Execute Gradle 'integrationTestJdbc' task
710-
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:postgresql://localhost:5432/ -Dscalardb.jdbc.username=postgres -Dscalardb.jdbc.password=postgres ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
710+
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
711711

712712
- name: Upload Gradle test reports
713713
if: always()
@@ -771,7 +771,7 @@ jobs:
771771
uses: gradle/actions/setup-gradle@v4
772772

773773
- name: Execute Gradle 'integrationTestJdbc' task
774-
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:postgresql://localhost:5432/ -Dscalardb.jdbc.username=postgres -Dscalardb.jdbc.password=postgres ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
774+
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
775775

776776
- name: Upload Gradle test reports
777777
if: always()
@@ -835,7 +835,7 @@ jobs:
835835
uses: gradle/actions/setup-gradle@v4
836836

837837
- name: Execute Gradle 'integrationTestJdbc' task
838-
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:postgresql://localhost:5432/ -Dscalardb.jdbc.username=postgres -Dscalardb.jdbc.password=postgres ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
838+
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
839839

840840
- name: Upload Gradle test reports
841841
if: always()
@@ -899,7 +899,7 @@ jobs:
899899
uses: gradle/actions/setup-gradle@v4
900900

901901
- name: Execute Gradle 'integrationTestJdbc' task
902-
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:postgresql://localhost:5432/ -Dscalardb.jdbc.username=postgres -Dscalardb.jdbc.password=postgres ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
902+
run: ./gradlew integrationTestJdbc ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
903903

904904
- name: Upload Gradle test reports
905905
if: always()
@@ -1461,7 +1461,7 @@ jobs:
14611461
uses: gradle/actions/setup-gradle@v4
14621462

14631463
- name: Execute Gradle 'integrationTestJdbc' task
1464-
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mariadb://localhost:3306 ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
1464+
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mariadb://localhost:3306 -Dscalardb.jdbc.username=root -Dscalardb.jdbc.password=mysql ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
14651465

14661466
- name: Upload Gradle test reports
14671467
if: always()
@@ -1521,7 +1521,7 @@ jobs:
15211521
uses: gradle/actions/setup-gradle@v4
15221522

15231523
- name: Execute Gradle 'integrationTestJdbc' task
1524-
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mariadb://localhost:3306 ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
1524+
run: ./gradlew integrationTestJdbc -Dscalardb.jdbc.url=jdbc:mariadb://localhost:3306 -Dscalardb.jdbc.username=root -Dscalardb.jdbc.password=mysql ${{ matrix.mode.group_commit_enabled && env.INT_TEST_GRADLE_OPTIONS_FOR_GROUP_COMMIT || '' }}
15251525

15261526
- name: Upload Gradle test reports
15271527
if: always()
@@ -1743,13 +1743,19 @@ jobs:
17431743
name: db2_12.1_integration_test_reports_${{ matrix.mode.label }}
17441744
path: core/build/reports/tests/integrationTestJdbc
17451745

1746-
1747-
17481746
integration-test-for-multi-storage:
17491747
name: Multi-storage integration test (${{ matrix.mode.label }})
17501748
runs-on: ubuntu-latest
17511749

17521750
services:
1751+
postgres:
1752+
image: postgres:17-alpine
1753+
env:
1754+
POSTGRES_USER: postgres
1755+
POSTGRES_PASSWORD: postgres
1756+
ports:
1757+
- 5432:5432
1758+
17531759
cassandra:
17541760
image: cassandra:3.11
17551761
env:
@@ -1767,10 +1773,6 @@ jobs:
17671773
group_commit_enabled: true
17681774

17691775
steps:
1770-
- name: Run MySQL 8
1771-
run: |
1772-
docker run -e MYSQL_ROOT_PASSWORD=mysql -p 3306:3306 -d mysql:8 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
1773-
17741776
- uses: actions/checkout@v4
17751777

17761778
- name: Set up JDK ${{ env.JAVA_VERSION }} (${{ env.JAVA_VENDOR }})

core/src/integration-test/java/com/scalar/db/storage/jdbc/JdbcEnv.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ public final class JdbcEnv {
88
private static final String PROP_JDBC_USERNAME = "scalardb.jdbc.username";
99
private static final String PROP_JDBC_PASSWORD = "scalardb.jdbc.password";
1010

11-
private static final String DEFAULT_JDBC_URL = "jdbc:mysql://localhost:3306/";
12-
private static final String DEFAULT_JDBC_USERNAME = "root";
13-
private static final String DEFAULT_JDBC_PASSWORD = "mysql";
11+
private static final String DEFAULT_JDBC_URL = "jdbc:postgresql://localhost:5432/";
12+
private static final String DEFAULT_JDBC_USERNAME = "postgres";
13+
private static final String DEFAULT_JDBC_PASSWORD = "postgres";
1414

1515
private JdbcEnv() {}
1616

core/src/integration-test/java/com/scalar/db/storage/multistorage/MultiStorageEnv.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public final class MultiStorageEnv {
1818
private static final String DEFAULT_CASSANDRA_USERNAME = "cassandra";
1919
private static final String DEFAULT_CASSANDRA_PASSWORD = "cassandra";
2020

21-
private static final String DEFAULT_JDBC_CONTACT_POINT = "jdbc:mysql://localhost:3306/";
22-
private static final String DEFAULT_JDBC_USERNAME = "root";
23-
private static final String DEFAULT_JDBC_PASSWORD = "mysql";
21+
private static final String DEFAULT_JDBC_CONTACT_POINT = "jdbc:postgresql://localhost:5432/";
22+
private static final String DEFAULT_JDBC_USERNAME = "postgres";
23+
private static final String DEFAULT_JDBC_PASSWORD = "postgres";
2424

2525
private MultiStorageEnv() {}
2626

0 commit comments

Comments
 (0)