From 235d8d3294a8ea5db885b4ccc52ad00054d4c400 Mon Sep 17 00:00:00 2001 From: copilotcoder Date: Thu, 11 Jun 2026 17:44:14 -0400 Subject: [PATCH] Would the JS checks like to actually work? Signed-off-by: copilotcoder --- .gitea/workflows/cicd-checks.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.gitea/workflows/cicd-checks.yaml b/.gitea/workflows/cicd-checks.yaml index 9e2f49d..51a8b37 100644 --- a/.gitea/workflows/cicd-checks.yaml +++ b/.gitea/workflows/cicd-checks.yaml @@ -209,6 +209,34 @@ jobs: git -C /workspace config core.eol lf && git -C /workspace add -A fi && + case "${HOOK}" in + eslint|prettier|tsdoc-lint|typescript-check) + echo 'JS hook detected; ensuring frontend yarn install state exists' && + cd /workspace/frontend && + if [ ! -f '.yarn/install-state.gz' ]; then + echo 'Missing .yarn/install-state.gz; running yarn install' && + install_ok=false && + for i in 1 2 3; do + echo 'yarn install attempt' "$i"'/3' && + if timeout 1200 corepack yarn install --immutable --mode=skip-build; then + install_ok=true + break + fi + if [ "$i" -lt 3 ]; then + echo 'yarn install failed; cleaning and retrying in 20s' && + rm -rf node_modules .yarn/install-state.gz .yarn/cache && + corepack yarn cache clean --all 2>/dev/null || true && + sleep 20 + fi + done && + if [ "$install_ok" != 'true' ]; then + echo '❌ Unable to prepare frontend dependencies for JS pre-commit hooks' && + exit 1 + fi + fi && + cd /workspace + ;; + esac && /workspace/backend/.venv/bin/pre-commit run ${HOOK} --all-files --show-diff-on-failure "