diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-19 15:59:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-19 15:59:31 +0000 |
commit | 0d84055eb6a3a22f33b606b8c73bd424116692e5 (patch) | |
tree | bea9851f5f1ae4a5378dd12f7335d7d0a8a0f402 /.github | |
parent | 9a86932c8bbac06afc70ea190399e767763d877e (diff) | |
parent | 793a491923ba11adbe1024e0eb0402923165dafa (diff) | |
download | stable-diffusion-webui-gfx803-0d84055eb6a3a22f33b606b8c73bd424116692e5.tar.gz stable-diffusion-webui-gfx803-0d84055eb6a3a22f33b606b8c73bd424116692e5.tar.bz2 stable-diffusion-webui-gfx803-0d84055eb6a3a22f33b606b8c73bd424116692e5.zip |
Merge pull request #10291 from akx/test-overhaul
Test overhaul
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/run_tests.yaml | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 0708398b..226cf759 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -18,18 +18,53 @@ jobs: cache-dependency-path: | **/requirements*txt launch.py - - name: Run tests - run: python launch.py --tests test --no-half --disable-opt-split-attention --use-cpu all --skip-torch-cuda-test + - name: Install test dependencies + run: pip install wait-for-it -r requirements-test.txt + env: + PIP_DISABLE_PIP_VERSION_CHECK: "1" + PIP_PROGRESS_BAR: "off" + - name: Setup environment + run: python launch.py --skip-torch-cuda-test --exit env: PIP_DISABLE_PIP_VERSION_CHECK: "1" PIP_PROGRESS_BAR: "off" TORCH_INDEX_URL: https://download.pytorch.org/whl/cpu WEBUI_LAUNCH_LIVE_OUTPUT: "1" - - name: Upload main app stdout-stderr + PYTHONUNBUFFERED: "1" + - name: Start test server + run: > + python -m coverage run + --data-file=.coverage.server + launch.py + --skip-prepare-environment + --skip-torch-cuda-test + --test-server + --no-half + --disable-opt-split-attention + --use-cpu all + --add-stop-route + 2>&1 | tee output.txt & + - name: Run tests + run: | + wait-for-it --service 127.0.0.1:7860 -t 600 + python -m pytest -vv --junitxml=test/results.xml --cov . --cov-report=xml --verify-base-url test + - name: Kill test server + if: always() + run: curl -vv -XPOST http://127.0.0.1:7860/_stop && sleep 10 + - name: Show coverage + run: | + python -m coverage combine .coverage* + python -m coverage report -i + python -m coverage html -i + - name: Upload main app output + uses: actions/upload-artifact@v3 + if: always() + with: + name: output + path: output.txt + - name: Upload coverage HTML uses: actions/upload-artifact@v3 if: always() with: - name: stdout-stderr - path: | - test/stdout.txt - test/stderr.txt + name: htmlcov + path: htmlcov |