- Require the same Comfy auth on all Majoor GET routes as on writes, closing a read-confidentiality gap for remote/multi-user deployments (no-op when Comfy auth is disabled, the default single-user setup). - Gate nightly and stable releases on a quality job (pytest, mypy, frontend typecheck/build/tests, dist/ drift check) before publishing, and refresh the committed dist/ bundle to match a clean build. - Pin softprops/action-gh-release and Comfy-Org/publish-node-action to commit SHAs. - Resolve ComfyUI's CacheProvider through the public comfy_api.latest.Caching alias instead of the underscore-private _caching module. - Make asset-delete DB cleanup atomic: a failed cleanup statement now aborts the transaction instead of committing a partial delete.
106 lines
2.8 KiB
YAML
106 lines
2.8 KiB
YAML
name: Nightly Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
- nightly
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '.github/workflows/**'
|
|
- 'tests/**'
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
quality:
|
|
name: Quality Gate
|
|
runs-on: ubuntu-22.04
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version: "20"
|
|
cache: "npm"
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install .[dev]
|
|
|
|
- name: Run pytest
|
|
run: python -m pytest -q
|
|
|
|
- name: Run mypy
|
|
run: python -m mypy --config-file mypy.ini
|
|
|
|
- name: Install JS dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Typecheck frontend
|
|
run: npx tsc -p tsconfig.json --noEmit --pretty false
|
|
|
|
- name: Build frontend bundle
|
|
run: npm run build
|
|
|
|
- name: Fail if committed dist/ is stale
|
|
run: |
|
|
if ! git diff --quiet -- dist; then
|
|
echo "::error::Committed dist/ differs from a fresh build. Run 'npm run build' and commit the result before releasing."
|
|
git diff --stat -- dist
|
|
exit 1
|
|
fi
|
|
|
|
- name: Run JS tests (vitest)
|
|
run: npm run test:js
|
|
|
|
build-nightly:
|
|
needs: quality
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Create Archive
|
|
# Nous reproduisons ici la logique d'exclusion de votre script make_release_zip.ps1
|
|
run: |
|
|
echo "nightly" > .mjr_channel
|
|
zip -r ComfyUI-Majoor-AssetsManager_nightly.zip . \
|
|
-x "*.git/*" \
|
|
-x ".github/*" \
|
|
-x ".claude/*" \
|
|
-x "*/__pycache__/*" \
|
|
-x "node_modules/*" \
|
|
-x "*/.pytest_cache/*" \
|
|
-x "tests/*" \
|
|
-x "scripts/make_release_zip.ps1" \
|
|
-x "coverage_*.json" \
|
|
-x "audit_findings.md" \
|
|
-x ".vscode/*" \
|
|
-x "*.zip"
|
|
|
|
- name: Update Nightly Release
|
|
uses: softprops/action-gh-release@5113cdc90fd4d541c801c55356214017bf5ae34b # v3
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag_name: nightly
|
|
name: "Nightly Build (Development)"
|
|
prerelease: true
|
|
overwrite_files: true
|
|
files: |
|
|
./ComfyUI-Majoor-AssetsManager_nightly.zip
|