mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-06 13:47:06 +00:00
Merge 5cbdd724f7 into 51435f1718
This commit is contained in:
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
11
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
<!--
|
||||
Please format codes by ruff before pull request.
|
||||
|
||||
For example:
|
||||
$ pip install -r ./requirements_dev.txt
|
||||
$ make style
|
||||
|
||||
To test:
|
||||
$ make test
|
||||
-->
|
||||
41
.github/workflows/ci.yml
vendored
Normal file
41
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.11"]
|
||||
os: [ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Create venv
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
|
||||
- name: Load cached venv
|
||||
id: cached-poetry-dependencies
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .venv
|
||||
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements_dev.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: .venv/bin/pip install -r ./requirements_dev.txt
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
make test
|
||||
17
Makefile
Normal file
17
Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
.PHONY: all
|
||||
all:
|
||||
|
||||
.PHONY: style
|
||||
style:
|
||||
ruff format --respect-gitignore
|
||||
|
||||
.PHONY: test_style
|
||||
test_style:
|
||||
ruff format --respect-gitignore --check
|
||||
|
||||
.PHONY: test
|
||||
test: test_style
|
||||
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
SHELL=/bin/bash
|
||||
1
requirements_dev.txt
Normal file
1
requirements_dev.txt
Normal file
@@ -0,0 +1 @@
|
||||
ruff==0.3.4
|
||||
Reference in New Issue
Block a user