venv?
This commit is contained in:
parent
e539162506
commit
ef0210b384
@ -22,16 +22,18 @@ jobs:
|
|||||||
# not to have GHA download an (at the time of writing) 4 GB cache
|
# not to have GHA download an (at the time of writing) 4 GB cache
|
||||||
# of PyTorch and other dependencies.
|
# of PyTorch and other dependencies.
|
||||||
- name: create venv
|
- name: create venv
|
||||||
run: python -m venv venv && source venv/bin/activate
|
run: python -m venv venv
|
||||||
- name: Install Ruff
|
- name: Install Ruff
|
||||||
run: pip install ruff==0.1.6
|
run: venv/bin/pip3 install ruff==0.1.6
|
||||||
- name: Run Ruff
|
- name: Run Ruff
|
||||||
run: ruff .
|
run: venv/bin/ruff .
|
||||||
lint-js:
|
lint-js:
|
||||||
name: eslint
|
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
|
if: gitea.event_name != 'pull_request' || gitea.event.pull_request.head.repo.full_name != gitea.event.pull_request.base.repo.full_name
|
||||||
steps:
|
steps:
|
||||||
|
- name: Prepare env
|
||||||
|
run: apk add --no-cache nodejs git curl python3
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
|
@ -26,7 +26,7 @@ jobs:
|
|||||||
**/requirements*txt
|
**/requirements*txt
|
||||||
launch.py
|
launch.py
|
||||||
- name: create venv
|
- name: create venv
|
||||||
run: python -m venv venv && source venv/bin/activate
|
run: python -m venv venv
|
||||||
- name: Cache models
|
- name: Cache models
|
||||||
id: cache-models
|
id: cache-models
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@ -34,12 +34,12 @@ jobs:
|
|||||||
path: models
|
path: models
|
||||||
key: "2023-12-30"
|
key: "2023-12-30"
|
||||||
- name: Install test dependencies
|
- 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:
|
env:
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
||||||
PIP_PROGRESS_BAR: "off"
|
PIP_PROGRESS_BAR: "off"
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
run: python launch.py --skip-torch-cuda-test --exit
|
run: venv/bin/python3 launch.py --skip-torch-cuda-test --exit
|
||||||
env:
|
env:
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
PIP_DISABLE_PIP_VERSION_CHECK: "1"
|
||||||
PIP_PROGRESS_BAR: "off"
|
PIP_PROGRESS_BAR: "off"
|
||||||
@ -47,7 +47,7 @@ jobs:
|
|||||||
WEBUI_LAUNCH_LIVE_OUTPUT: "1"
|
WEBUI_LAUNCH_LIVE_OUTPUT: "1"
|
||||||
PYTHONUNBUFFERED: "1"
|
PYTHONUNBUFFERED: "1"
|
||||||
- name: Print installed packages
|
- name: Print installed packages
|
||||||
run: pip freeze
|
run: /venv/bin/pip3 freeze
|
||||||
- name: Download models
|
- name: Download models
|
||||||
run: |
|
run: |
|
||||||
declare -a urls=(
|
declare -a urls=(
|
||||||
@ -73,7 +73,7 @@ jobs:
|
|||||||
# done
|
# done
|
||||||
- name: Start test server
|
- name: Start test server
|
||||||
run: >
|
run: >
|
||||||
python -m coverage run
|
venv/bin/python3 -m coverage run
|
||||||
--data-file=.coverage.server
|
--data-file=.coverage.server
|
||||||
launch.py
|
launch.py
|
||||||
--skip-prepare-environment
|
--skip-prepare-environment
|
||||||
@ -89,7 +89,7 @@ jobs:
|
|||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
wait-for-it --service 127.0.0.1:7860 -t 20
|
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
|
# 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.
|
# real SD model. We need to find a way to load empty SD model.
|
||||||
# - name: Run ControlNet tests
|
# - name: Run ControlNet tests
|
||||||
|
Loading…
Reference in New Issue
Block a user