Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,27 @@ jobs:
- name: Check out code
uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

# Install from uv.lock so CI uses the same pinned versions as local dev
# (`--frozen` fails loudly if the lockfile drifts from pyproject.toml
# instead of silently resolving a new upstream release).
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install -e .
run: uv sync --extra dev --frozen --python ${{ matrix.python-version }}

- name: Test CUDA auto-detection (skips if no GPU)
run: |
pytest tests/comfy_cli/test_cuda_detect_real.py -v
run: uv run --frozen --extra dev --python ${{ matrix.python-version }} pytest tests/comfy_cli/test_cuda_detect_real.py -v

- name: Test e2e
env:
PYTHONPATH: ${{ github.workspace }}
TEST_E2E: true
run: |
pytest tests/e2e
run: uv run --frozen --extra dev --python ${{ matrix.python-version }} pytest tests/e2e

- name: Test torch backend compilation
env:
TEST_TORCH_BACKEND: "true"
run: |
pytest tests/uv/test_torch_backend_compile.py -xvs
run: uv run --frozen --extra dev --python ${{ matrix.python-version }} pytest tests/uv/test_torch_backend_compile.py -xvs
18 changes: 9 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ jobs:
steps:
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
python-version: '3.10' # Follow the min version in pyproject.toml
enable-cache: true

# Install from uv.lock so CI uses the same pinned versions as local dev
# (`--frozen` fails loudly if the lockfile drifts from pyproject.toml
# instead of silently resolving a new upstream release). `--python 3.10`
# follows the min version in pyproject.toml.
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov jsonschema
pip install -e .
run: uv sync --extra dev --frozen --python 3.10

- name: Run tests
env:
PYTHONPATH: ${{ github.workspace }}
run: |
pytest --cov=comfy_cli --cov-report=xml .
run: uv run --frozen --extra dev --python 3.10 pytest --cov=comfy_cli --cov-report=xml .

- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6.0.2
Expand Down
Loading