diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a3fc099..12d61fe4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,12 +42,27 @@ jobs: command: fmt args: --all -- --check - name: Run cargo test with tokio + if: ${{ matrix.gremlin-server }} == 3.5.7 uses: actions-rs/cargo@v1 with: command: test args: --manifest-path gremlin-client/Cargo.toml --features=tokio-runtime - name: Run cargo test with async-std + if: ${{ matrix.gremlin-server }} == 3.5.7 uses: actions-rs/cargo@v1 with: command: test args: --manifest-path gremlin-client/Cargo.toml --features=async-std-runtime + # MergeV as a step doesn't exist in 3.5.x, so selectively run those tests + - name: Run cargo test with tokio + if: ${{ matrix.gremlin-server }} == 3.6.5 + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path gremlin-client/Cargo.toml --features=tokio-runtime,merge_v_tests + - name: Run cargo test with async-std + if: ${{ matrix.gremlin-server }} == 3.6.5 + uses: actions-rs/cargo@v1 + with: + command: test + args: --manifest-path gremlin-client/Cargo.toml --features=async-std-runtime,merge_v_tests diff --git a/gremlin-client/Cargo.toml b/gremlin-client/Cargo.toml index 69cbd0d6..d7f2dbde 100644 --- a/gremlin-client/Cargo.toml +++ b/gremlin-client/Cargo.toml @@ -15,6 +15,7 @@ readme = "README.md" [features] default = [] +merge_v_tests = [] diff --git a/gremlin-client/tests/integration_traversal.rs b/gremlin-client/tests/integration_traversal.rs index 195e13a9..eb6ac210 100644 --- a/gremlin-client/tests/integration_traversal.rs +++ b/gremlin-client/tests/integration_traversal.rs @@ -1,11 +1,10 @@ -use std::collections::HashMap; use std::convert::TryInto; use gremlin_client::process::traversal::{traversal, Order, __}; use gremlin_client::structure::{ - Cardinality, List, Map, Merge, Pop, TextP, Vertex, VertexProperty, P, T, + Cardinality, List, Map, Pop, TextP, Vertex, VertexProperty, P, T, }; -use gremlin_client::{utils, GKey, GValue}; +use gremlin_client::utils; mod common; @@ -23,6 +22,7 @@ fn test_simple_vertex_traversal() { } #[test] +#[cfg(feature = "merge_v_tests")] fn test_merge_v_no_options() { let g = traversal().with_remote(graph()); let expected_id = 1_000i64; @@ -67,6 +67,7 @@ fn test_merge_v_no_options() { } #[test] +#[cfg(feature = "merge_v_tests")] fn test_merge_v_options() { let g = traversal().with_remote(graph()); let expected_label = "test_merge_v_options_label"; @@ -132,6 +133,7 @@ fn test_merge_v_options() { } #[test] +#[cfg(feature = "merge_v_tests")] fn test_merge_v_start_step() { let g = traversal().with_remote(graph()); let expected_id = 10000i64;