mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
Update workflow tests with cleanup and documentation
This commit is contained in:
46
.github/workflows/tests.yml
vendored
46
.github/workflows/tests.yml
vendored
@@ -1,42 +1,44 @@
|
|||||||
|
name: Test with pytet
|
||||||
|
|
||||||
name: Python package
|
on:
|
||||||
|
push:
|
||||||
on: [push]
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
- sd3
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
- sd3
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
python-version: ["3.10"]
|
python-version: ["3.10"] # Python versions to test
|
||||||
|
pytorch-version: ["2.4.0"] # PyTorch versions to test
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python
|
- uses: actions/setup-python@v5
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: ${{ matrix.python-version }}
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install and update pip, setuptools, wheel
|
||||||
run: python -m pip install --upgrade pip setuptools wheel
|
run: |
|
||||||
|
# Setuptools, wheel for compiling some packages
|
||||||
- uses: actions/checkout@v4
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: '3.x'
|
|
||||||
cache: 'pip' # caching pip dependencies
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
# Pre-install torch to pin version (requirements.txt has dependencies like transformers which requires pytorch)
|
||||||
pip install dadaptation==3.2 torch==2.4.0 torchvision==0.19.0 accelerate==0.33.0
|
pip install dadaptation==3.2 torch==${{ matrix.pytorch-version }} torchvision==0.19.0 pytest==8.3.4
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: |
|
run: pytest # See pytest.ini for configuration
|
||||||
pip install pytest
|
|
||||||
pytest
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user