Skip to content

Commit c0df4d6

Browse files
author
Oleksandr Dzhychko
authored
Merge pull request #850 from modelix/MODELIX-594-extend-JS-API
feat(model-client): extend JS API
2 parents cc31abe + 1b4dc8d commit c0df4d6

29 files changed

+4531
-56
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,11 @@ updates:
7979
commit-message:
8080
prefix: "build(deps)"
8181
prefix-development: "build(deps)"
82+
- package-ecosystem: "npm"
83+
open-pull-requests-limit: 20
84+
directory: "/model-client-js-test/model-client-connection"
85+
schedule:
86+
interval: "daily"
87+
commit-message:
88+
prefix: "build(deps)"
89+
prefix-development: "build(deps)"

.github/workflows/build.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,26 @@ jobs:
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9191
run: model-api-gen-gradle-test/ci.sh
9292

93+
test-model-client-js:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- uses: actions/checkout@v4
97+
- name: Set up JDK
98+
uses: actions/setup-java@v4
99+
with:
100+
distribution: 'temurin'
101+
java-version: '21'
102+
- name: Set up Gradle
103+
uses: gradle/actions/setup-gradle@v3
104+
- name: Assemble
105+
env:
106+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107+
run: ./gradlew --build-cache assemble publishToMavenLocal -PciBuild=true
108+
- name: Test Model Client JS API
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
run: model-client-js-test/ci.sh
112+
93113
test-bulk-model-sync-gradle:
94114
runs-on: ubuntu-latest
95115
steps:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
rev: v3.0.3
3737
hooks:
3838
- id: prettier
39-
files: ^(vue-model-api)|(model-api-gen-gradle-test/vue-integration)/
39+
files: ^(vue-model-api)|(model-api-gen-gradle-test/vue-integration)|(model-client-js-test/model-client-connection)/
4040
- repo: https://github.com/pre-commit/mirrors-eslint
4141
# IMPORTANT: keep versions of hook and additional dependencies in sync with the versions configured in `vue-model-api/package.json`
4242
rev: v8.56.0

model-client-js-test/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/build/
2+
**/dist/
3+
**/node_modules/
4+
**/typescript_src/
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import com.github.gradle.node.NodeExtension
2+
import com.github.gradle.node.NodePlugin
3+
4+
plugins {
5+
base
6+
alias(libs.plugins.node) apply false
7+
}
8+
9+
subprojects {
10+
plugins.withType<NodePlugin> {
11+
project.extensions.configure<NodeExtension> {
12+
version.set(libs.versions.node)
13+
download.set(true)
14+
}
15+
}
16+
}

model-client-js-test/ci.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
3+
set -e
4+
(
5+
TEST_DIR="$(dirname "$(readlink -f "$0")")"
6+
cd "$TEST_DIR/../"
7+
if [ "${CI}" != "true" ]; then
8+
trap cleanup INT TERM EXIT
9+
cleanup () {
10+
kill "${MODEL_SERVER_PID}"
11+
exit
12+
}
13+
fi
14+
./gradlew :model-server:run --console=plain --args="-inmemory -port 28103" &
15+
MODEL_SERVER_PID=$!
16+
17+
curl -X GET --retry 30 --retry-connrefused --retry-delay 1 http://localhost:28103/health
18+
cd "$TEST_DIR"
19+
./gradlew build --console=plain --stacktrace
20+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
org.gradle.parallel=true
2+
kotlin.daemon.jvmargs=-Xmx3g
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../gradle/wrapper/gradle-wrapper.jar
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../gradle/wrapper/gradle-wrapper.properties

model-client-js-test/gradlew

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../gradlew

0 commit comments

Comments
 (0)