| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| services: |
| |
| gremlin-server-test-js: |
| container_name: gremlin-server-test-js |
| image: tinkerpop/gremlin-server-test:${GREMLIN_SERVER} |
| build: |
| context: ../../ |
| dockerfile: docker/gremlin-test-server/Dockerfile |
| args: |
| - GREMLIN_SERVER=${GREMLIN_SERVER} |
| ports: |
| - "45940:45940" |
| - "45941:45941" |
| - "45942:45942" |
| - "4588:4588" |
| volumes: |
| - ${HOME}/.groovy:/root/.groovy |
| - ${HOME}/.m2:/root/.m2 |
| - ${ABS_PROJECT_HOME}/gremlin-test/target:/opt/gremlin-test |
| healthcheck: |
| test: [ "CMD-SHELL", "curl -sf -X POST -H 'Content-Type: application/json' -d '{\"gremlin\":\"g.inject(1)\"}' http://localhost:45940" ] |
| interval: 30s |
| timeout: 10s |
| retries: 30 |
| start_period: 30s |
| |
| gremlin-js-integration-tests: |
| container_name: gremlin-js-integration-tests |
| image: node:${NODE_VERSION:-22} |
| user: "${HOST_UID:-1000}:${HOST_GID:-1000}" |
| volumes: |
| - ../../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features:/gremlin-test |
| - ../../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/structure/io/graphbinary:/workspace/gremlin-js/gremlin-javascript/gremlin-test/graphbinary |
| - ../../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/language/translator:/workspace/gremlin-js/gremlin-javascript/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/language/translator |
| - ../../docker/gremlin-test-server:/workspace/gremlin-js/gremlin-javascript/gremlin-test-server |
| - ../../gremlin-tools/gremlin-socket-server/conf:/workspace/gremlin-js/gremlin-javascript/gremlin-socket-server/conf/ |
| - ../../gremlin-language/src/main/antlr4:/gremlin-language/src/main/antlr4 |
| - ../..:/workspace |
| environment: |
| - DOCKER_ENVIRONMENT=true |
| - GREMLIN_SERVER_URL=http://gremlin-server-test-js:45940/gremlin |
| - VERTEX_LABEL=javascript-example |
| - IO_TEST_DIRECTORY=/workspace/gremlin-js/gremlin-javascript/gremlin-test/graphbinary/ |
| - NPM_CONFIG_CACHE=/tmp/npm-cache |
| working_dir: /workspace/gremlin-js/gremlin-javascript |
| command: > |
| bash -c "npm ci && npm run test && npm run features-docker |
| && echo 'Running examples' |
| && cd /workspace/gremlin-js/gremlin-javascript/examples/node |
| && node basic-gremlin.js |
| && node connections.js |
| && node modern-traversals.js |
| && echo 'All examples completed successfully'" |
| depends_on: |
| gremlin-server-test-js: |
| condition: service_healthy |
| |
| |