YAML Syntax Fix: - Fix malformed indentation on line 60 (missing proper step structure) - Ensure all steps are properly aligned and formatted GitHub Actions Updates: - actions/setup-python@v4 → v5 (latest stable) - pdm-project/setup-pdm@v3 → v4 (latest stable) - actions/cache@v3 → v4 (latest stable) - actions/upload-artifact@v3 → v4 (fixes deprecation error) The workflow should now run without syntax errors or deprecation warnings.
73 lines
1.6 KiB
YAML
73 lines
1.6 KiB
YAML
# CI Workflow for ComfyUI-Lora-Visualizer
|
|
#
|
|
# This workflow runs the same checks as the local `pdm ci` command:
|
|
# - Code formatting check with black (fails if not formatted)
|
|
# - Unit tests with pytest
|
|
# - Code quality checks with pylint
|
|
#
|
|
# Triggers:
|
|
# - Push to main branch
|
|
# - Pull requests to main branch
|
|
# - Manual dispatch via GitHub Actions UI
|
|
#
|
|
# To run the same checks locally before pushing:
|
|
# pdm ci
|
|
#
|
|
# To fix formatting issues locally:
|
|
# pdm format
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch: # Allow manual triggering
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install PDM
|
|
uses: pdm-project/setup-pdm@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Cache PDM dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/pdm
|
|
.venv
|
|
key: ${{ runner.os }}-pdm-${{ hashFiles('pdm.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pdm-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pdm sync --dev
|
|
|
|
- name: Run CI checks (format-check, test, lint)
|
|
run: |
|
|
pdm ci
|
|
|
|
- name: Upload test results
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: test-results-${{ github.run_number }}
|
|
path: |
|
|
.coverage
|
|
htmlcov/
|
|
retention-days: 30
|