[bugfix]: get the full CI suite green on main (pytest 9 flag teardown, Qwen golden env) (#2059)

Co-authored-by: Aryan Kumar <aryan5v@users.noreply.github.com>
This commit is contained in:
Aryan Kumar
2026-11-02 23:32:40 -08:00
committed by GitHub
co-authored by Aryan Kumar
parent de873eae2d
commit 3fe9c0c70d
13 changed files with 197 additions and 38 deletions
+3 -2
View File
@@ -22,8 +22,9 @@ jobs:
trigger:
if: >-
inputs.pr_number > 0
|| (github.event.action == 'labeled' && github.event.label.name == 'ready')
|| github.event.action == 'synchronize'
|| (github.event.pull_request.base.ref == github.event.repository.default_branch
&& ((github.event.action == 'labeled' && github.event.label.name == 'ready')
|| github.event.action == 'synchronize'))
runs-on: ubuntu-latest
# Job-level concurrency: only this guarded job acquires the group, so an
# unrelated `labeled` event (which skips the job) cannot cancel an in-flight
+45 -3
View File
@@ -12,10 +12,52 @@ permissions:
issues: write
jobs:
publish-node:
name: Publish Custom Node to registry
# Any pyproject.toml edit triggers this workflow, but the registry rejects a
# version it already has ("The node version already exists"). Publish only
# when [project].version changed, as the PyPI workflow does.
check-version-change:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'hao-ai-lab' }}
outputs:
changed: ${{ steps.check.outputs.changed }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Compare [project].version with the version before this push
id: check
shell: python
env:
BEFORE_SHA: ${{ github.event.before }}
run: |
import os
import subprocess
import tomllib
def version(text: str) -> str | None:
return tomllib.loads(text).get("project", {}).get("version")
def git(*args: str) -> subprocess.CompletedProcess:
return subprocess.run(["git", *args], capture_output=True, text=True)
# A push can carry several commits; compare with the tip before the push, not HEAD~1.
base = os.environ.get("BEFORE_SHA", "").strip()
if not base or set(base) == {"0"} or git("fetch", "--no-tags", "--depth=1", "origin", base).returncode:
base = "HEAD~1"
new = version(open("pyproject.toml", encoding="utf-8").read())
previous = git("show", f"{base}:pyproject.toml")
old = version(previous.stdout) if previous.returncode == 0 else None
changed = new is not None and new != old
print(f"base: {base}, previous version: {old}, current version: {new}, changed: {changed}")
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
output.write(f"changed={str(changed).lower()}\n")
publish-node:
name: Publish Custom Node to registry
needs: check-version-change
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'hao-ai-lab' && (needs.check-version-change.outputs.changed == 'true' || github.event_name == 'workflow_dispatch') }}
steps:
- name: Check out code
uses: actions/checkout@v4
@@ -25,4 +67,4 @@ jobs:
uses: Comfy-Org/publish-node-action@v1
with:
## Add your own personal access token to your Github Repository secrets and reference it here.
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}