feat: add conditional test running to pre-push hook (#9055)

This commit is contained in:
Daniel 2025-11-05 12:06:22 -05:00 committed by GitHub
parent e86acef844
commit 3eee340aa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,6 +18,16 @@ fi
$pnpm_cmd run check-types
# Load .env.local if it exists
if [ -f ".env.local" ]; then
export $(grep -v '^#' .env.local | xargs)
fi
# Run tests if RUN_TESTS_ON_PUSH is set to true
if [ "$RUN_TESTS_ON_PUSH" = "true" ]; then
$pnpm_cmd run test
fi
# Check for new changesets.
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
echo "Changeset files: $NEW_CHANGESETS"