Skip to content

Commit c5def8f

Browse files
author
Joan Martinez
committed
test: skip uneeded tests
1 parent a067a74 commit c5def8f

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,9 @@ jobs:
470470
WHEEL_FILE=$(ls dist/*whl)
471471
pip install "$WHEEL_FILE[common,devel,test]" --no-cache-dir
472472
if [[ "${{ matrix.protobuf-version }}" == "==3.19.6" ]]; then
473-
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.47.5 grpcio-reflection==1.47.5 grpcio-health-checking==1.47.5
473+
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
474474
else
475-
pip install -U protobuf${{ matrix.protobuf-version }}
475+
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
476476
fi
477477
jina
478478
export JINA_LOG_LEVEL="ERROR"
@@ -546,9 +546,9 @@ jobs:
546546
WHEEL_FILE=$(ls dist/*whl)
547547
pip install "$WHEEL_FILE[common,devel,test]" --no-cache-dir
548548
if [[ "${{ matrix.protobuf-version }}" == "==3.19.6" ]]; then
549-
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.47.5 grpcio-reflection==1.47.5 grpcio-health-checking==1.47.5
549+
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
550550
else
551-
pip install -U protobuf${{ matrix.protobuf-version }}
551+
pip install -U protobuf${{ matrix.protobuf-version }} grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
552552
fi
553553
jina
554554
export JINA_LOG_LEVEL="ERROR"
@@ -731,6 +731,7 @@ jobs:
731731
WHEEL_FILE=$(ls dist/*whl)
732732
pip install "$WHEEL_FILE[all]" --no-cache-dir
733733
pip install docarray==0.21.0
734+
pip install grpcio==1.65.5 grpcio-reflection==1.65.5 grpcio-health-checking==1.65.5
734735
jina
735736
export JINA_LOG_LEVEL="ERROR"
736737
- name: Test

tests/unit/orchestrate/flow/flow-construct/test_flow_visualization.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,71 +9,79 @@
99
cur_dir = os.path.dirname(os.path.abspath(__file__))
1010

1111

12+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
1213
def test_visualization_with_yml_file_img(tmpdir):
1314
Flow.load_config(
1415
os.path.join(cur_dir, '../../../yaml/test_flow_visualization.yml')
1516
).plot(output=os.path.join(tmpdir, 'flow.svg'))
1617
assert os.path.exists(os.path.join(tmpdir, 'flow.svg'))
1718

1819

20+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
1921
def test_visualization_with_yml_file_jpg(tmpdir):
2022
Flow.load_config(
2123
os.path.join(cur_dir, '../../../yaml/test_flow_visualization.yml')
2224
).plot(output=os.path.join(tmpdir, 'flow.jpg'))
2325
assert os.path.exists(os.path.join(tmpdir, 'flow.jpg'))
2426

2527

28+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
2629
def test_visualization_with_yml_file_jpg_lr(tmpdir):
2730
Flow.load_config(
2831
os.path.join(cur_dir, '../../../yaml/test_flow_visualization.yml')
2932
).plot(output=os.path.join(tmpdir, 'flow-hor.jpg'), vertical_layout=False)
3033
assert os.path.exists(os.path.join(tmpdir, 'flow-hor.jpg'))
3134

3235

36+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
3337
def test_visualization_plot_twice(tmpdir):
3438
(
3539
Flow()
36-
.add(name='pod_a')
37-
.plot(output=os.path.join(tmpdir, 'flow1.svg'))
38-
.add(name='pod_b', needs='gateway')
39-
.needs(['pod_a', 'pod_b'])
40-
.plot(output=os.path.join(tmpdir, 'flow2.svg'))
40+
.add(name='pod_a')
41+
.plot(output=os.path.join(tmpdir, 'flow1.svg'))
42+
.add(name='pod_b', needs='gateway')
43+
.needs(['pod_a', 'pod_b'])
44+
.plot(output=os.path.join(tmpdir, 'flow2.svg'))
4145
)
4246

4347
assert os.path.exists(os.path.join(tmpdir, 'flow1.svg'))
4448
assert os.path.exists(os.path.join(tmpdir, 'flow2.svg'))
4549

4650

51+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
4752
def test_visualization_plot_in_middle(tmpdir):
4853
(
4954
Flow()
50-
.add(name='pod_a')
51-
.plot(output=os.path.join(tmpdir, 'flow3.svg'))
52-
.add(name='pod_b', needs='gateway')
53-
.needs(['pod_a', 'pod_b'])
55+
.add(name='pod_a')
56+
.plot(output=os.path.join(tmpdir, 'flow3.svg'))
57+
.add(name='pod_b', needs='gateway')
58+
.needs(['pod_a', 'pod_b'])
5459
)
5560

5661
assert os.path.exists(os.path.join(tmpdir, 'flow3.svg'))
5762

5863

64+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
5965
def test_flow_before_after_plot(tmpdir):
60-
6166
Flow().add(uses_before=Executor, uses_after=Executor, name='p1').plot(
6267
os.path.join(tmpdir, 'flow.svg')
6368
)
6469
assert os.path.exists(os.path.join(tmpdir, 'flow.svg'))
6570

6671

72+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
6773
def test_flow_before_plot(tmpdir):
6874
Flow().add(uses_before=Executor, name='p1').plot(os.path.join(tmpdir, 'flow.svg'))
6975
assert os.path.exists(os.path.join(tmpdir, 'flow.svg'))
7076

7177

78+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
7279
def test_flow_after_plot(tmpdir):
7380
Flow().add(uses_after=Executor, name='p1').plot(os.path.join(tmpdir, 'flow.svg'))
7481
assert os.path.exists(os.path.join(tmpdir, 'flow.svg'))
7582

7683

84+
@pytest.mark.skipif("GITHUB_WORKFLOW" in os.environ, reason="Skip unneeded")
7785
@pytest.mark.parametrize('vertical_layout', [True, False])
7886
def test_flow_vertical(tmpdir, vertical_layout):
7987
def get_image_size(fname):
@@ -114,11 +122,3 @@ def get_image_size(fname):
114122
assert w_h is not None
115123
w, h = w_h
116124
assert (w < h) == vertical_layout
117-
118-
119-
def test_flow_plot_after_build():
120-
f = Flow().add().add()
121-
with f:
122-
f.plot()
123-
124-
f.plot()

0 commit comments

Comments
 (0)