Skip to content

Commit a735f5d

Browse files
committed
check CI time
1 parent c3df6cd commit a735f5d

2 files changed

Lines changed: 23 additions & 7 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ on:
55
- main
66
paths:
77
- "comfy_cli/**"
8-
- "!.github/**"
9-
- "!tests/**"
8+
- ".github/**"
9+
- "tests/**"
1010
- "!.coveragerc"
1111
- "!.gitignore"
1212
pull_request:
1313
branches:
1414
- main
1515
paths:
1616
- "comfy_cli/**"
17-
- "!.github/**"
18-
- "!tests/**"
17+
- ".github/**"
18+
- "tests/**"
1919
- "!.coveragerc"
2020
- "!.gitignore"
2121

@@ -55,4 +55,4 @@ jobs:
5555
PYTHONPATH: ${{ github.workspace }}
5656
TEST_E2E: true
5757
run: |
58-
pytest tests/e2e
58+
pytest tests/e2e -sv

tests/e2e/test_e2e.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
import pytest
77

88

9+
def time_point(content: str):
10+
print(datetime.now().strftime("%Y-%m-%d %H:%M:%S"), content)
11+
12+
913
def e2e_test(func):
1014
return pytest.mark.skipif(
1115
os.getenv("TEST_E2E", "false") != "true",
@@ -15,7 +19,7 @@ def e2e_test(func):
1519

1620
def exec(cmd: str, **kwargs) -> subprocess.CompletedProcess[str]:
1721
cmd = dedent(cmd).strip()
18-
print(f"cmd: {cmd}")
22+
time_point(f"cmd: {cmd}")
1923

2024
proc = subprocess.run(
2125
args=cmd,
@@ -26,7 +30,8 @@ def exec(cmd: str, **kwargs) -> subprocess.CompletedProcess[str]:
2630
check=False,
2731
**kwargs,
2832
)
29-
print(proc.stdout, proc.stderr)
33+
time_point(f"stdout: {proc.stdout}")
34+
time_point(f"stderr: {proc.stderr}")
3035
return proc
3136

3237

@@ -67,6 +72,7 @@ def comfy_cli(workspace):
6772

6873
@e2e_test
6974
def test_model(comfy_cli):
75+
time_point("before load model")
7076
url = "https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/mm_sd_v14.ckpt?download=true"
7177
path = os.path.join("models", "animatediff_models")
7278
proc = exec(
@@ -76,6 +82,7 @@ def test_model(comfy_cli):
7682
)
7783
assert 0 == proc.returncode
7884

85+
time_point("before list")
7986
proc = exec(
8087
f"""
8188
{comfy_cli} model list --relative-path {path}
@@ -84,6 +91,7 @@ def test_model(comfy_cli):
8491
assert 0 == proc.returncode
8592
assert "animatediff_models" in proc.stdout
8693

94+
time_point("before remove")
8795
proc = exec(
8896
f"""
8997
{comfy_cli} model remove --relative-path {path} --model-names animatediff_models --confirm
@@ -94,6 +102,7 @@ def test_model(comfy_cli):
94102

95103
@e2e_test
96104
def test_node(comfy_cli, workspace):
105+
time_point("before node install")
97106
node = "comfyui-animatediff-evolved"
98107
proc = exec(
99108
f"""
@@ -102,13 +111,15 @@ def test_node(comfy_cli, workspace):
102111
)
103112
assert 0 == proc.returncode
104113

114+
time_point("before node reinstall")
105115
proc = exec(
106116
f"""
107117
{comfy_cli} node reinstall {node}
108118
"""
109119
)
110120
assert 0 == proc.returncode
111121

122+
time_point("before node show")
112123
proc = exec(
113124
f"""
114125
{comfy_cli} node show all
@@ -117,13 +128,15 @@ def test_node(comfy_cli, workspace):
117128
assert 0 == proc.returncode
118129
assert node in proc.stdout
119130

131+
time_point("before node update")
120132
proc = exec(
121133
f"""
122134
{comfy_cli} node update {node}
123135
"""
124136
)
125137
assert 0 == proc.returncode
126138

139+
time_point("before node disable/enable")
127140
proc = exec(
128141
f"""
129142
{comfy_cli} node disable {node}
@@ -138,6 +151,7 @@ def test_node(comfy_cli, workspace):
138151
)
139152
assert 0 == proc.returncode
140153

154+
time_point("before node publish")
141155
pubID = "comfytest123"
142156
pubToken = "6075cf7b-47e7-4c58-a3de-38f59a9bcc22"
143157
proc = exec(
@@ -155,13 +169,15 @@ def test_run(comfy_cli):
155169
url = "https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly-fp16.safetensors?download=true"
156170
path = os.path.join("models", "checkpoints")
157171
name = "v1-5-pruned-emaonly.safetensors"
172+
time_point("before download model")
158173
proc = exec(
159174
f"""
160175
{comfy_cli} model download --url {url} --relative-path {path} --filename {name}
161176
"""
162177
)
163178
assert 0 == proc.returncode
164179

180+
time_point("before run workflow")
165181
workflow = os.path.join(os.path.dirname(os.path.realpath(__file__)), "workflow.json")
166182
proc = exec(
167183
f"""

0 commit comments

Comments
 (0)