mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-06-27 17:27:08 +00:00
Create test.yml
This commit is contained in:
parent
0e75f96b34
commit
9ebf130694
37
.github/workflows/test.yml
vendored
Normal file
37
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
name: Test WebUI Startup
|
||||||
|
|
||||||
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test-webui:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout código
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Instalar dependências
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libgl1-mesa-glx wait-for-it curl
|
||||||
|
python -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
pip install -r requirements.txt || true # use requirements.txt se existir
|
||||||
|
|
||||||
|
- name: Iniciar servidor WebUI
|
||||||
|
run: |
|
||||||
|
source venv/bin/activate
|
||||||
|
nohup python webui.py > log.txt 2>&1 &
|
||||||
|
|
||||||
|
- name: Esperar servidor iniciar
|
||||||
|
run: |
|
||||||
|
chmod +x wait-for-it.sh || true
|
||||||
|
wait-for-it --timeout=20 127.0.0.1:7860
|
||||||
|
|
||||||
|
- name: Testar API (opcional)
|
||||||
|
run: |
|
||||||
|
curl -X POST http://127.0.0.1:7860/sdapi/v1/server-stop || true
|
||||||
|
|
||||||
|
- name: Mostrar log do servidor
|
||||||
|
run: |
|
||||||
|
cat log.txt || true
|
Loading…
Reference in New Issue
Block a user