mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 14:38:51 +00:00
Fix smoke test database URLs
This commit is contained in:
3 files changed
+25
-8
No files matched your search
@@ -5,6 +5,9 @@ on:
|
|||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: smoke-test-${{ github.event.workflow_run.id }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
@@ -58,11 +61,15 @@ jobs:
|
|||||||
.gradle/loom-cache
|
.gradle/loom-cache
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/libs.versions.*', '**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
restore-keys: ${{ runner.os }}-gradle-
|
restore-keys: ${{ runner.os }}-gradle-
|
||||||
- name: Smoke test (Paper, Postgres)
|
|
||||||
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=postgres
|
|
||||||
- name: Smoke test (Paper, MariaDB)
|
|
||||||
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=mariadb
|
|
||||||
- name: Smoke test (Paper, H2)
|
|
||||||
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=h2
|
|
||||||
- name: Smoke test (Paper, JSON)
|
- name: Smoke test (Paper, JSON)
|
||||||
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=json
|
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=json
|
||||||
|
timeout-minutes: 5
|
||||||
|
- name: Smoke test (Paper, H2)
|
||||||
|
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=h2
|
||||||
|
timeout-minutes: 5
|
||||||
|
- name: Smoke test (Paper, MariaDB)
|
||||||
|
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=mariadb
|
||||||
|
timeout-minutes: 5
|
||||||
|
- name: Smoke test (Paper, Postgres)
|
||||||
|
run: ./gradlew :carbonchat-paper:runServer -PsmokeTest=true -PsmokeTestMode=postgres
|
||||||
|
timeout-minutes: 5
|
||||||
@@ -145,8 +145,14 @@ public final class CarbonCommonModule extends AbstractModule {
|
|||||||
switch (smokeTestMode) {
|
switch (smokeTestMode) {
|
||||||
case "h2" -> storageType = PrimaryConfig.StorageType.H2;
|
case "h2" -> storageType = PrimaryConfig.StorageType.H2;
|
||||||
case "json" -> storageType = PrimaryConfig.StorageType.JSON;
|
case "json" -> storageType = PrimaryConfig.StorageType.JSON;
|
||||||
case "postgres" -> storageType = PrimaryConfig.StorageType.PSQL;
|
case "postgres" -> {
|
||||||
case "mariadb" -> storageType = PrimaryConfig.StorageType.MYSQL;
|
storageType = PrimaryConfig.StorageType.PSQL;
|
||||||
|
configManager.primaryConfig().databaseSettings().url("jdbc:postgresql://localhost:5432/carbon");
|
||||||
|
}
|
||||||
|
case "mariadb" -> {
|
||||||
|
storageType = PrimaryConfig.StorageType.MYSQL;
|
||||||
|
configManager.primaryConfig().databaseSettings().url("jdbc:mariadb://localhost:3306/carbon");
|
||||||
|
}
|
||||||
default -> throw new IllegalArgumentException("Unknown smoke test mode: " + smokeTestMode);
|
default -> throw new IllegalArgumentException("Unknown smoke test mode: " + smokeTestMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ public class DatabaseSettings {
|
|||||||
return this.url;
|
return this.url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String url(final String url) {
|
||||||
|
return this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
public String username() {
|
public String username() {
|
||||||
return this.username;
|
return this.username;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user