This is an automated email from the ASF dual-hosted git repository.

lyndonb pushed a commit to branch 3.6-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/3.6-dev by this push:
     new f68d3adfab Testing github actions (#108)
f68d3adfab is described below

commit f68d3adfab20dc00d4fdaeb0fb674c5ed1b357f7
Author: Lyndon Bauto <[email protected]>
AuthorDate: Mon May 16 13:58:34 2022 -0700

    Testing github actions (#108)
    
    * e-adding 3.6-dev github actions
    
    * Temporarily disabling so I can get quick result
    
    * Fixed issue with cucumber
---
 .github/workflows/build-test.yml                   | 65 +++++++++++-----------
 gremlin-go/Dockerfile                              |  6 +-
 gremlin-go/docker-compose.yml                      |  1 +
 .../docker/gremlin-server-integration-secure.yaml  | 14 ++---
 gremlin-go/docker/gremlin-server-integration.yaml  | 16 +++---
 gremlin-go/driver/cucumber/cucumberSteps_test.go   |  2 +-
 gremlin-go/driver/cucumber/cucumberWorld.go        | 20 +++++++
 gremlin-go/driver/strategies.go                    |  5 +-
 gremlin-go/driver/strategies_test.go               |  2 +-
 9 files changed, 77 insertions(+), 54 deletions(-)

diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml
index 78abde8340..a7824835e9 100644
--- a/.github/workflows/build-test.yml
+++ b/.github/workflows/build-test.yml
@@ -202,36 +202,35 @@ jobs:
         run: |
           mvn clean install -pl 
-:gremlin-javascript,-:gremlin-python,-gremlin-dotnet,-:gremlin-dotnet-source,-:gremlin-dotnet-tests
 -q -DskipTests -Dci
           mvn verify -pl :neo4j-gremlin -DincludeNeo4j
-  #go:
-  #  name: go
-  #  timeout-minutes: 20
-  #  needs: smoke
-  #  runs-on: ubuntu-latest
-  #  steps:
-  #    - name: Checkout
-  #      uses: actions/checkout@v3
-  #
-  #    - name: Setup Go
-  #      uses: actions/setup-go@v3
-  #      with:
-  #        go-version: '1.17'
-  #
-  #    - name: Generate Gremlin Server Base Image
-  #      working-directory: .
-  #      run: |
-  #        mvn clean install -pl :gremlin-server -DskipTests 
-DskipIntegrationTests=true -am && mvn install -Pdocker-images -pl 
:gremlin-server
-  #
-  #    - name: Execute Go tests
-  #      working-directory: ./gremlin-go
-  #      run: |
-  #        docker-compose up --exit-code-from gremlin-go-integration-tests
-  #        docker-compose down
-  #
-  #    - name: Upload to Codecov
-  #      uses: codecov/codecov-action@v2
-  #      with:
-  #        working-directory: ./gremlin-go
-  #
-  #    - name: Go-Vet
-  #      working-directory: ./gremlin-go
-  #      run: go vet ./...
+  go:
+    name: go
+    timeout-minutes: 20
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Setup Go
+        uses: actions/setup-go@v3
+        with:
+          go-version: '1.17'
+
+      - name: Generate Gremlin Server Base Image
+        working-directory: .
+        run: |
+          mvn clean install -pl :gremlin-server -DskipTests 
-DskipIntegrationTests=true -am && mvn install -Pdocker-images -pl 
:gremlin-server
+
+      - name: Execute Go tests
+        working-directory: ./gremlin-go
+        run: |
+          docker-compose up --exit-code-from gremlin-go-integration-tests
+          docker-compose down
+
+      - name: Upload to Codecov
+        uses: codecov/codecov-action@v2
+        with:
+          working-directory: ./gremlin-go
+
+      - name: Go-Vet
+        working-directory: ./gremlin-go
+        run: go vet ./...
diff --git a/gremlin-go/Dockerfile b/gremlin-go/Dockerfile
index d010366dc8..18873b80ae 100644
--- a/gremlin-go/Dockerfile
+++ b/gremlin-go/Dockerfile
@@ -16,7 +16,7 @@
 # under the License.
 
 ARG GREMLIN_SERVER_VERSION
-FROM tinkerpop/gremlin-server:${GREMLIN_SERVER_VERSION:-3.5.4-SNAPSHOT}
+FROM tinkerpop/gremlin-server:${GREMLIN_SERVER_VERSION:-3.6.1-SNAPSHOT}
 
 USER root
 RUN mkdir -p /opt
@@ -36,9 +36,9 @@ ARG NEO4J_VERSION
 # but only only port 45940 is configured with the neo4j graph as the 
neo4j-empty.properties
 # is statically pointing at a temp directory and that space can only be 
accessed by one
 # graph at a time.
-RUN /opt/gremlin-server/bin/gremlin-server.sh install org.apache.tinkerpop 
neo4j-gremlin ${NEO4J_VERSION:-3.5.4}
+RUN /opt/gremlin-server/bin/gremlin-server.sh install org.apache.tinkerpop 
neo4j-gremlin ${NEO4J_VERSION:-3.6.1}
 
-# Gremlin server and neo4j versions are set to 3.5.4 by default, to change 
their versions, add args under the
+# Gremlin server and neo4j versions are set to 3.6.1 by default, to change 
their versions, add args under the
 # docker-compose build step, e.g.:
 #      args:
 #        GREMLIN_SERVER_VERSION: 3.5.x-SNAPSHOT
diff --git a/gremlin-go/docker-compose.yml b/gremlin-go/docker-compose.yml
index da379abb0e..6dda9553bc 100644
--- a/gremlin-go/docker-compose.yml
+++ b/gremlin-go/docker-compose.yml
@@ -26,6 +26,7 @@ services:
       dockerfile: gremlin-go/Dockerfile
       args:
         NEO4J_VERSION: 3.5.3
+        GREMLIN_SERVER_VERSION: 3.6.1-SNAPSHOT
     ports:
       - "45940:45940"
       - "45941:45941"
diff --git a/gremlin-go/docker/gremlin-server-integration-secure.yaml 
b/gremlin-go/docker/gremlin-server-integration-secure.yaml
index d91b546448..dc5a04ae82 100644
--- a/gremlin-go/docker/gremlin-server-integration-secure.yaml
+++ b/gremlin-go/docker/gremlin-server-integration-secure.yaml
@@ -19,13 +19,13 @@ host: 0.0.0.0
 port: 45941
 evaluationTimeout: 30000
 graphs: {
-  graph: conf/tinkergraph-empty.properties,
-  immutable: conf/tinkergraph-empty.properties,
-  classic: conf/tinkergraph-empty.properties,
-  modern: conf/tinkergraph-empty.properties,
-  crew: conf/tinkergraph-empty.properties,
-  grateful: conf/tinkergraph-empty.properties,
-  sink: conf/tinkergraph-empty.properties}
+  graph: scripts/tinkergraph-empty.properties,
+  immutable: scripts/tinkergraph-empty.properties,
+  classic: scripts/tinkergraph-empty.properties,
+  modern: scripts/tinkergraph-empty.properties,
+  crew: scripts/tinkergraph-empty.properties,
+  grateful: scripts/tinkergraph-empty.properties,
+  sink: scripts/tinkergraph-empty.properties}
 scriptEngines: {
   gremlin-lang : {},
   gremlin-groovy: {
diff --git a/gremlin-go/docker/gremlin-server-integration.yaml 
b/gremlin-go/docker/gremlin-server-integration.yaml
index 4318869a86..64c8a88bf7 100644
--- a/gremlin-go/docker/gremlin-server-integration.yaml
+++ b/gremlin-go/docker/gremlin-server-integration.yaml
@@ -19,14 +19,14 @@ host: 0.0.0.0
 port: 45940
 evaluationTimeout: 30000
 graphs: {
-  graph: conf/tinkergraph-empty.properties,
-  immutable: conf/tinkergraph-empty.properties,
-  classic: conf/tinkergraph-empty.properties,
-  modern: conf/tinkergraph-empty.properties,
-  crew: conf/tinkergraph-empty.properties,
-  grateful: conf/tinkergraph-empty.properties,
-  sink: conf/tinkergraph-empty.properties,
-  tx: conf/neo4j-empty.properties
+  graph: scripts/tinkergraph-empty.properties,
+  immutable: scripts/tinkergraph-empty.properties,
+  classic: scripts/tinkergraph-empty.properties,
+  modern: scripts/tinkergraph-empty.properties,
+  crew: scripts/tinkergraph-empty.properties,
+  grateful: scripts/tinkergraph-empty.properties,
+  sink: scripts/tinkergraph-empty.properties,
+  tx: scripts/neo4j-empty.properties
 }
 scriptEngines: {
   gremlin-lang : {},
diff --git a/gremlin-go/driver/cucumber/cucumberSteps_test.go 
b/gremlin-go/driver/cucumber/cucumberSteps_test.go
index 1929d5f640..247927fea6 100644
--- a/gremlin-go/driver/cucumber/cucumberSteps_test.go
+++ b/gremlin-go/driver/cucumber/cucumberSteps_test.go
@@ -876,13 +876,13 @@ func getEnvOrDefaultBool(key string, defaultValue bool) 
bool {
 }
 
 func TestCucumberFeatures(t *testing.T) {
-       t.Skip("NOTICE: Skipping Godog tests on 3.6-dev and master until 
support for new tests is added.")
        skipTestsIfNotEnabled(t, "cucumber godog tests",
                getEnvOrDefaultBool("RUN_INTEGRATION_WITH_ALIAS_TESTS", true))
        suite := godog.TestSuite{
                TestSuiteInitializer: InitializeTestSuite,
                ScenarioInitializer:  InitializeScenario,
                Options: &godog.Options{
+                       Tags:     "~@GraphComputerOnly && 
~@AllowNullPropertyValues",
                        Format:   "pretty",
                        Paths:    
[]string{getEnvOrDefaultString("CUCUMBER_FEATURE_FOLDER", 
"../../../gremlin-test/features")},
                        TestingT: t, // Testing instance that will run subtests.
diff --git a/gremlin-go/driver/cucumber/cucumberWorld.go 
b/gremlin-go/driver/cucumber/cucumberWorld.go
index a9d8be2727..bfe21e26a0 100644
--- a/gremlin-go/driver/cucumber/cucumberWorld.go
+++ b/gremlin-go/driver/cucumber/cucumberWorld.go
@@ -253,6 +253,26 @@ func strategyFactory(strategyName string, params 
map[string]interface{}) interfa
        case "VertexProgramStrategy":
                graphComputer, _ := params["graphComputer"].(string)
                return gremlingo.VertexProgramStrategy(graphComputer, "", "", 
0, nil, nil, nil)
+       case "ProductiveByStrategy":
+               productiveKeys, _ := params["productiveKeys"]
+               productiveKeysInterface := productiveKeys.([]interface{})
+               var productiveKeysStrings = make([]string, 
len(productiveKeysInterface))
+               for i := range productiveKeysInterface {
+                       productiveKeysStrings[i] = 
productiveKeysInterface[i].(string)
+               }
+               return gremlingo.ProductiveByStrategy(productiveKeysStrings)
+       case "ReadOnlyStrategy":
+               return gremlingo.ReadOnlyStrategy()
+       case "SubgraphStrategy":
+               checkAdjacentVertices, _ := params["checkAdjacentVertices"]
+               edges, _ := params["edges"]
+               vertices, _ := params["vertices"]
+               vertexProperties, _ := params["vertexProperties"]
+               return gremlingo.SubgraphStrategy(vertices, edges, 
vertexProperties, checkAdjacentVertices)
+       case "SeedStrategy":
+               seed, _ := params["seed"]
+               return gremlingo.SeedStrategy(int64(seed.(int)))
        }
        return nil
+
 }
diff --git a/gremlin-go/driver/strategies.go b/gremlin-go/driver/strategies.go
index 01c86aff7d..b89e5b6481 100644
--- a/gremlin-go/driver/strategies.go
+++ b/gremlin-go/driver/strategies.go
@@ -101,7 +101,7 @@ func SeedStrategy(seed int64) *traversalStrategy {
 // SubgraphStrategy provides a way to limit the view of a Traversal. By 
providing Traversal representations that
 // represent a form of filtering criterion for Vertices and/or Edges, this 
strategy will inject that criterion into
 // the appropriate places of a Traversal thus restricting what it Traverses 
and returns.
-func SubgraphStrategy(vertices, edges, vertexProperties interface{}) 
*traversalStrategy { // all vars can be Traversal or null
+func SubgraphStrategy(vertices, edges, vertexProperties interface{}, 
checkAdjacentVertices interface{}) *traversalStrategy { // all vars can be 
Traversal or null
        config := make(map[string]interface{})
        if vertices != nil {
                config["vertices"] = vertices
@@ -112,6 +112,9 @@ func SubgraphStrategy(vertices, edges, vertexProperties 
interface{}) *traversalS
        if vertexProperties != nil {
                config["vertexProperties"] = vertexProperties
        }
+       if checkAdjacentVertices != nil {
+               config["checkAdjacentVertices"] = checkAdjacentVertices.(bool)
+       }
        return &traversalStrategy{name: decorationNamespace + 
"SubgraphStrategy", configuration: config}
 }
 
diff --git a/gremlin-go/driver/strategies_test.go 
b/gremlin-go/driver/strategies_test.go
index 4a89c1a0bd..763d46a16b 100644
--- a/gremlin-go/driver/strategies_test.go
+++ b/gremlin-go/driver/strategies_test.go
@@ -98,7 +98,7 @@ func TestStrategy(t *testing.T) {
                g := getModernGraph(t, testNoAuthUrl, &AuthInfo{}, 
&tls.Config{})
                defer g.remoteConnection.Close()
 
-               count, err := 
g.WithStrategies(SubgraphStrategy(T__.HasLabel(testLabel), nil, 
nil)).V().Count().ToList()
+               count, err := 
g.WithStrategies(SubgraphStrategy(T__.HasLabel(testLabel), nil, nil, 
nil)).V().Count().ToList()
                assert.Nil(t, err)
                assert.NotNil(t, count)
                assert.Equal(t, 1, len(count))

Reply via email to