Skip to content

Commit 9e4f68a

Browse files
authored
Stop exporting cl args and upload stdout and stderr as artifacts
1 parent 5808241 commit 9e4f68a

File tree

8 files changed

+27
-18
lines changed

8 files changed

+27
-18
lines changed

.github/workflows/run_tests.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,12 @@ jobs:
2222
${{ runner.os }}-pip-
2323
- name: Run tests
2424
run: |
25-
export COMMANDLINE_ARGS="--tests basic_features --no-half --disable-opt-split-attention --use-cpu all --skip-torch-cuda-test --port 80"
26-
python launch.py
25+
python launch.py --tests basic_features --no-half --disable-opt-split-attention --use-cpu all --skip-torch-cuda-test
26+
- name: Upload main app stdout-stderr
27+
uses: actions/upload-artifact@v3
28+
if: always()
29+
with:
30+
name: stdout-stderr
31+
path: |
32+
./test/stdout.txt
33+
./test/stderr.txt

launch.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ def tests(test_dir):
244244
if "--ckpt" not in sys.argv:
245245
sys.argv.append("--ckpt")
246246
sys.argv.append("./test/test_files/empty.pt")
247+
if "--skip-torch-cuda-test" not in sys.argv:
248+
sys.argv.append("--skip-torch-cuda-test")
247249

248250
print(f"Launching Web UI in another process for testing with arguments: {' '.join(sys.argv[1:])}")
249251

test/advanced_features/extras_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
class TestExtrasWorking(unittest.TestCase):
55
def setUp(self):
6-
self.url_img2img = "http://localhost:80/sdapi/v1/extra-single-image"
6+
self.url_img2img = "http://localhost:7860/sdapi/v1/extra-single-image"
77
self.simple_extras = {
88
"resize_mode": 0,
99
"show_extras_results": True,

test/advanced_features/txt2img_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class TestTxt2ImgWorking(unittest.TestCase):
66
def setUp(self):
7-
self.url_txt2img = "http://localhost:80/sdapi/v1/txt2img"
7+
self.url_txt2img = "http://localhost:7860/sdapi/v1/txt2img"
88
self.simple_txt2img = {
99
"enable_hr": False,
1010
"denoising_strength": 0,

test/basic_features/img2img_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class TestImg2ImgWorking(unittest.TestCase):
88
def setUp(self):
9-
self.url_img2img = "http://localhost:80/sdapi/v1/img2img"
9+
self.url_img2img = "http://localhost:7860/sdapi/v1/img2img"
1010
self.simple_img2img = {
1111
"init_images": [encode_pil_to_base64(Image.open(r"test/test_files/img2img_basic.png"))],
1212
"resize_mode": 0,

test/basic_features/txt2img_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class TestTxt2ImgWorking(unittest.TestCase):
66
def setUp(self):
7-
self.url_txt2img = "http://localhost:80/sdapi/v1/txt2img"
7+
self.url_txt2img = "http://localhost:7860/sdapi/v1/txt2img"
88
self.simple_txt2img = {
99
"enable_hr": False,
1010
"denoising_strength": 0,

test/basic_features/utils_test.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33

44
class UtilsTests(unittest.TestCase):
55
def setUp(self):
6-
self.url_options = "http://localhost:80/sdapi/v1/options"
7-
self.url_cmd_flags = "http://localhost:80/sdapi/v1/cmd-flags"
8-
self.url_samplers = "http://localhost:80/sdapi/v1/samplers"
9-
self.url_upscalers = "http://localhost:80/sdapi/v1/upscalers"
10-
self.url_sd_models = "http://localhost:80/sdapi/v1/sd-models"
11-
self.url_hypernetworks = "http://localhost:80/sdapi/v1/hypernetworks"
12-
self.url_face_restorers = "http://localhost:80/sdapi/v1/face-restorers"
13-
self.url_realesrgan_models = "http://localhost:80/sdapi/v1/realesrgan-models"
14-
self.url_prompt_styles = "http://localhost:80/sdapi/v1/prompt-styles"
15-
self.url_artist_categories = "http://localhost:80/sdapi/v1/artist-categories"
16-
self.url_artists = "http://localhost:80/sdapi/v1/artists"
6+
self.url_options = "http://localhost:7860/sdapi/v1/options"
7+
self.url_cmd_flags = "http://localhost:7860/sdapi/v1/cmd-flags"
8+
self.url_samplers = "http://localhost:7860/sdapi/v1/samplers"
9+
self.url_upscalers = "http://localhost:7860/sdapi/v1/upscalers"
10+
self.url_sd_models = "http://localhost:7860/sdapi/v1/sd-models"
11+
self.url_hypernetworks = "http://localhost:7860/sdapi/v1/hypernetworks"
12+
self.url_face_restorers = "http://localhost:7860/sdapi/v1/face-restorers"
13+
self.url_realesrgan_models = "http://localhost:7860/sdapi/v1/realesrgan-models"
14+
self.url_prompt_styles = "http://localhost:7860/sdapi/v1/prompt-styles"
15+
self.url_artist_categories = "http://localhost:7860/sdapi/v1/artist-categories"
16+
self.url_artists = "http://localhost:7860/sdapi/v1/artists"
1717

1818
def test_options_get(self):
1919
self.assertEqual(requests.get(self.url_options).status_code, 200)

test/server_poll.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def run_tests(proc, test_dir):
88
start_time = time.time()
99
while time.time()-start_time < timeout_threshold:
1010
try:
11-
requests.head("http://localhost:80/")
11+
requests.head("http://localhost:7860/")
1212
break
1313
except requests.exceptions.ConnectionError:
1414
if proc.poll() is not None:

0 commit comments

Comments
 (0)