venv?
Some checks failed
Linter / ruff (push) Successful in 12s
Linter / eslint (push) Failing after 1m18s
Tests / tests on CPU (push) Failing after 1m25s

This commit is contained in:
soaska 2024-05-03 19:13:54 +03:00
parent e539162506
commit ef0210b384
2 changed files with 12 additions and 10 deletions

View File

@ -22,16 +22,18 @@ jobs:
# not to have GHA download an (at the time of writing) 4 GB cache
# of PyTorch and other dependencies.
- name: create venv
run: python -m venv venv && source venv/bin/activate
run: python -m venv venv
- name: Install Ruff
run: pip install ruff==0.1.6
run: venv/bin/pip3 install ruff==0.1.6
- name: Run Ruff
run: ruff .
run: venv/bin/ruff .
lint-js:
name: eslint
runs-on: ubuntu-latest
runs-on: soaska
if: gitea.event_name != 'pull_request' || gitea.event.pull_request.head.repo.full_name != gitea.event.pull_request.base.repo.full_name
steps:
- name: Prepare env
run: apk add --no-cache nodejs git curl python3
- name: Checkout Code
uses: actions/checkout@v3
- name: Install Node.js

View File

@ -26,7 +26,7 @@ jobs:
**/requirements*txt
launch.py
- name: create venv
run: python -m venv venv && source venv/bin/activate
run: python -m venv venv
- name: Cache models
id: cache-models
uses: actions/cache@v3
@ -34,12 +34,12 @@ jobs:
path: models
key: "2023-12-30"
- name: Install test dependencies
run: pip install wait-for-it -r requirements-test.txt
run: venv/bin/pip3 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
run: venv/bin/python3 launch.py --skip-torch-cuda-test --exit
env:
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_PROGRESS_BAR: "off"
@ -47,7 +47,7 @@ jobs:
WEBUI_LAUNCH_LIVE_OUTPUT: "1"
PYTHONUNBUFFERED: "1"
- name: Print installed packages
run: pip freeze
run: /venv/bin/pip3 freeze
- name: Download models
run: |
declare -a urls=(
@ -73,7 +73,7 @@ jobs:
# done
- name: Start test server
run: >
python -m coverage run
venv/bin/python3 -m coverage run
--data-file=.coverage.server
launch.py
--skip-prepare-environment
@ -89,7 +89,7 @@ jobs:
- name: Run tests
run: |
wait-for-it --service 127.0.0.1:7860 -t 20
python -m pytest -vv --junitxml=test/results.xml --cov . --cov-report=xml --verify-base-url test
venv/bin/python3 -m pytest -vv --junitxml=test/results.xml --cov . --cov-report=xml --verify-base-url test
# TODO(huchenlei): Enable ControlNet tests. Currently it is too slow to run these tests on CPU with
# real SD model. We need to find a way to load empty SD model.
# - name: Run ControlNet tests