aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.yml21
-rw-r--r--.github/pull_request_template.md33
-rw-r--r--.github/workflows/on_pull_request.yaml49
-rw-r--r--.github/workflows/run_tests.yaml53
4 files changed, 100 insertions, 56 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 7d435297..3a8b9953 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -48,6 +48,15 @@ body:
validations:
required: true
- type: dropdown
+ id: py-version
+ attributes:
+ label: What Python version are you running on ?
+ multiple: false
+ options:
+ - Python 3.10.x
+ - Python 3.11.x (above, no supported yet)
+ - Python 3.9.x (below, no recommended)
+ - type: dropdown
id: platforms
attributes:
label: What platforms do you use to access the UI ?
@@ -60,6 +69,18 @@ body:
- Android
- Other/Cloud
- type: dropdown
+ id: device
+ attributes:
+ label: What device are you running WebUI on?
+ multiple: true
+ options:
+ - Nvidia GPUs (RTX 20 above)
+ - Nvidia GPUs (GTX 16 below)
+ - AMD GPUs (RX 6000 above)
+ - AMD GPUs (RX 5000 below)
+ - CPU
+ - Other GPUs
+ - type: dropdown
id: browsers
attributes:
label: What browsers do you use to access the UI ?
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 69056331..c9fcda2e 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,28 +1,15 @@
-# Please read the [contributing wiki page](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Contributing) before submitting a pull request!
+## Description
-If you have a large change, pay special attention to this paragraph:
+* a simple description of what you're trying to accomplish
+* a summary of changes in code
+* which issues it fixes, if any
-> Before making changes, if you think that your feature will result in more than 100 lines changing, find me and talk to me about the feature you are proposing. It pains me to reject the hard work someone else did, but I won't add everything to the repo, and it's better if the rejection happens before you have to waste time working on the feature.
+## Screenshots/videos:
-Otherwise, after making sure you're following the rules described in wiki page, remove this section and continue on.
-**Describe what this pull request is trying to achieve.**
+## Checklist:
-A clear and concise description of what you're trying to accomplish with this, so your intent doesn't have to be extracted from your code.
-
-**Additional notes and description of your changes**
-
-More technical discussion about your changes go here, plus anything that a maintainer might have to specifically take a look at, or be wary of.
-
-**Environment this was tested in**
-
-List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.
- - OS: [e.g. Windows, Linux]
- - Browser: [e.g. chrome, safari]
- - Graphics card: [e.g. NVIDIA RTX 2080 8GB, AMD RX 6600 8GB]
-
-**Screenshots or videos of your changes**
-
-If applicable, screenshots or a video showing off your changes. If it edits an existing UI, it should ideally contain a comparison of what used to be there, before your changes were made.
-
-This is **required** for anything that touches the user interface. \ No newline at end of file
+- [ ] I have read [contributing wiki page](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Contributing)
+- [ ] I have performed a self-review of my own code
+- [ ] My code follows the [style guidelines](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Contributing#code-style)
+- [ ] My code passes [tests](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Tests)
diff --git a/.github/workflows/on_pull_request.yaml b/.github/workflows/on_pull_request.yaml
index a168be5b..7b7219fd 100644
--- a/.github/workflows/on_pull_request.yaml
+++ b/.github/workflows/on_pull_request.yaml
@@ -1,39 +1,34 @@
-# See https://github.com/actions/starter-workflows/blob/1067f16ad8a1eac328834e4b0ae24f7d206f810d/ci/pylint.yml for original reference file
name: Run Linting/Formatting on Pull Requests
on:
- push
- pull_request
- # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore for syntax docs
- # if you want to filter out branches, delete the `- pull_request` and uncomment these lines :
- # pull_request:
- # branches:
- # - master
- # branches-ignore:
- # - development
jobs:
- lint:
+ lint-python:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- - name: Set up Python 3.10
- uses: actions/setup-python@v4
+ - uses: actions/setup-python@v4
with:
- python-version: 3.10.6
- cache: pip
- cache-dependency-path: |
- **/requirements*txt
- - name: Install PyLint
- run: |
- python -m pip install --upgrade pip
- pip install pylint
- # This lets PyLint check to see if it can resolve imports
- - name: Install dependencies
- run: |
- export COMMANDLINE_ARGS="--skip-torch-cuda-test --exit"
- python launch.py
- - name: Analysing the code with pylint
- run: |
- pylint $(git ls-files '*.py')
+ python-version: 3.11
+ # NB: there's no cache: pip here since we're not installing anything
+ # from the requirements.txt file(s) in the repository; it's faster
+ # not to have GHA download an (at the time of writing) 4 GB cache
+ # of PyTorch and other dependencies.
+ - name: Install Ruff
+ run: pip install ruff==0.0.265
+ - name: Run Ruff
+ run: ruff .
+ lint-js:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Code
+ uses: actions/checkout@v3
+ - name: Install Node.js
+ uses: actions/setup-node@v3
+ with:
+ node-version: 18
+ - run: npm i --ci
+ - run: npm run lint
diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml
index 9a0b8d22..226cf759 100644
--- a/.github/workflows/run_tests.yaml
+++ b/.github/workflows/run_tests.yaml
@@ -17,13 +17,54 @@ jobs:
cache: pip
cache-dependency-path: |
**/requirements*txt
+ launch.py
+ - 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"
+ 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: python launch.py --tests test --no-half --disable-opt-split-attention --use-cpu all --skip-torch-cuda-test
- - name: Upload main app stdout-stderr
+ 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