Skip to content

Commit cf55c86

Browse files
committed
ci(bulk-model-sync-gradle): fix ci specific problems
1 parent ed5fc50 commit cf55c86

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

model-sync-gradle-test/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ kotlin {
6969

7070
tasks.register("runModelServer", JavaExec::class) {
7171
group = "modelix"
72+
73+
description = "Launches a model-server instance to be used as a target for the test. " +
74+
"This task will block and is intended to be run in a separate process, apart from the actual test execution."
75+
7276
classpath = sourceSets["main"].runtimeClasspath
7377
mainClass.set("org.modelix.model.server.Main")
7478
args("-inmemory")
@@ -96,7 +100,7 @@ modelSync {
96100
includeModule("GraphSolution")
97101
fromLocal {
98102
mpsHome = mpsDir
99-
mpsHeapSize = "4g"
103+
mpsHeapSize = "2g"
100104
repositoryDir = repoDir
101105
}
102106
toModelServer {

model-sync-gradle-test/ci.sh

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
#!/bin/sh
22

33
set -e
4-
(
5-
cd "$(dirname "$0")"
64

7-
(
8-
cd graph-lang-api
9-
./gradlew publishToMavenLocal --console=plain
10-
)
5+
cd "$(dirname "$0")"
116

12-
./gradlew assemble --console=plain
7+
(
8+
cd graph-lang-api
9+
./gradlew publishToMavenLocal --console=plain
10+
)
1311

12+
./gradlew assemble --console=plain
13+
14+
if [ "${CI}" != "true" ]; then
1415
trap cleanup INT TERM EXIT
1516
cleanup () {
1617
kill "${MODEL_SERVER_PID}"
1718
exit
1819
}
20+
fi
1921

20-
./gradlew runModelServer --console=plain &
21-
MODEL_SERVER_PID=$!
22-
sleep 5
22+
./gradlew runModelServer --console=plain &
23+
MODEL_SERVER_PID=$!
24+
sleep 5
2325

24-
#CI needs more time
25-
if [ "${CI}" = "true" ]; then
26-
sleep 15
27-
fi
26+
#CI needs more time
27+
if [ "${CI}" = "true" ]; then
28+
sleep 10
29+
fi
2830

29-
curl -X POST http://127.0.0.1:28101/v2/repositories/ci-test/init
31+
curl -X POST http://127.0.0.1:28101/v2/repositories/ci-test/init
3032

31-
./gradlew runSyncTestPush --console=plain --stacktrace
32-
./gradlew test --tests 'PushTest'
33-
./gradlew runSyncTestPull --console=plain --stacktrace
34-
./gradlew test --tests 'PullTest'
35-
)
33+
./gradlew runSyncTestPush --console=plain --stacktrace
34+
./gradlew test --tests 'PushTest'
35+
./gradlew runSyncTestPull --console=plain --stacktrace
36+
./gradlew test --tests 'PullTest'

0 commit comments

Comments
 (0)