mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 06:28:48 +00:00
42 lines
890 B
YAML
42 lines
890 B
YAML
---
|
|
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
|