Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stop running cdk tests and linting on every push #2546

Merged
merged 2 commits into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
pnpm --filter cdk lint && pnpm --filter cdk test
# Fetch the latest changes from the remote without merging
git fetch origin

# Get the name of the current branch
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)

# Check if there are changes in the 'cdk' folder between the local branch and its remote
if git diff --exit-code --quiet origin/$CURRENT_BRANCH -- cdk/; then
echo "No changes detected in the 'cdk' folder. Skipping lint and test."
else
echo "Changes detected in the 'cdk' folder. Running lint and test..."
pnpm --filter cdk lint && pnpm --filter cdk test
fi