mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-03-23 06:40:23 -07:00
* docs(M03): seed M03 plan and toolcalls Made-with: Cursor * ci: add repository guardrail, update CONTRIBUTING workflow Made-with: Cursor * M03: Test architecture (smoke/quality/nightly) - Move tests to test/smoke/, scaffold test/quality and test/nightly - Add pytest.ini with smoke/quality/nightly markers - Split CI: run_smoke_tests (PR), run_quality_tests (push main), run_nightly_tests (schedule) - Remove run_tests.yaml - Add prevent_upstream_push.sh pre-push hook template - Update CONTRIBUTING.md with hook install and test tier docs - Add repo and base-branch guardrails to workflows Made-with: Cursor * ci: remove obsolete warns_merge_master workflow (Serena uses main) Made-with: Cursor * fix: add base_url to pytest.ini for pytest-base-url plugin Made-with: Cursor * docs(M03): ledger, run1, audit, summary Made-with: Cursor * docs(M03): ledger commit 4ce5cde9 Made-with: Cursor
113 lines
3.9 KiB
YAML
113 lines
3.9 KiB
YAML
name: Nightly Tests
|
|
|
|
on:
|
|
schedule:
|
|
# Run daily at 00:00 UTC
|
|
- cron: "0 0 * * *"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
nightly:
|
|
name: nightly tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Verify repository
|
|
run: |
|
|
if [ "$GITHUB_REPOSITORY" != "m-cahill/serena" ]; then
|
|
echo "::error::Serena CI must run only inside m-cahill/serena, not $GITHUB_REPOSITORY"
|
|
exit 1
|
|
fi
|
|
- name: Checkout Code
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
|
with:
|
|
ref: main
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
|
|
with:
|
|
python-version: 3.10.6
|
|
cache: pip
|
|
cache-dependency-path: |
|
|
**/requirements*txt
|
|
launch.py
|
|
- name: Cache models
|
|
id: cache-models
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: models
|
|
key: "2023-12-30"
|
|
- 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: Install base build tools
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install setuptools wheel
|
|
- name: Dependency vulnerability scan
|
|
run: |
|
|
pip install pip-audit
|
|
pip-audit || true
|
|
- name: Install runtime dependencies
|
|
run: |
|
|
pip install torch==2.1.2 torchvision==0.16.2 --extra-index-url https://download.pytorch.org/whl/cpu
|
|
pip install https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip --no-build-isolation
|
|
pip install https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip
|
|
pip install -r requirements_versions.txt
|
|
env:
|
|
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
|
PIP_PROGRESS_BAR: "off"
|
|
- name: Create stub repositories
|
|
run: python scripts/dev/create_stub_repos.py
|
|
- name: Setup environment
|
|
run: python launch.py --skip-prepare-environment --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"
|
|
PYTHONUNBUFFERED: "1"
|
|
- name: Smoke startup
|
|
run: |
|
|
python launch.py --skip-prepare-environment --skip-torch-cuda-test --test-server --use-cpu all --exit
|
|
- name: Print installed packages
|
|
run: pip freeze
|
|
- name: Start test server
|
|
run: >
|
|
python -m coverage run
|
|
--data-file=.coverage.server
|
|
launch.py
|
|
--skip-prepare-environment
|
|
--skip-torch-cuda-test
|
|
--test-server
|
|
--do-not-download-clip
|
|
--no-half
|
|
--disable-opt-split-attention
|
|
--use-cpu all
|
|
--api-server-stop
|
|
--port 7860
|
|
2>&1 | tee output.txt &
|
|
- name: Run nightly tests
|
|
run: |
|
|
wait-for-it --service 127.0.0.1:7860 -t 20
|
|
python -m pytest test -vv --junitxml=test/results.xml --cov . --cov-report=xml --verify-base-url
|
|
- name: Kill test server
|
|
if: always()
|
|
run: curl -vv -XPOST http://127.0.0.1:7860/sdapi/v1/server-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@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
if: always()
|
|
with:
|
|
name: output
|
|
path: output.txt
|
|
- name: Upload coverage HTML
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
if: always()
|
|
with:
|
|
name: htmlcov
|
|
path: htmlcov
|