Would the JS checks like to actually work?
All checks were successful
CICD Start / Sanity and Base Decision (pull_request) Successful in 1m19s
All checks were successful
CICD Start / Sanity and Base Decision (pull_request) Successful in 1m19s
Signed-off-by: copilotcoder <copilotcoder@darkhelm.org>
This commit is contained in:
@@ -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
|
||||
"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user