diff --git a/scripts/publish-npm.sh b/scripts/publish-npm.sh index 573777e..7a66c12 100755 --- a/scripts/publish-npm.sh +++ b/scripts/publish-npm.sh @@ -11,6 +11,15 @@ NC='\033[0m' # No Color echo "๐Ÿš€ Preparing n8n-mcp for npm publish..." +# Run tests first to ensure quality +echo "๐Ÿงช Running tests..." +npm test +if [ $? -ne 0 ]; then + echo -e "${RED}โŒ Tests failed. Aborting publish.${NC}" + exit 1 +fi +echo -e "${GREEN}โœ… All tests passed!${NC}" + # Sync version to runtime package first echo "๐Ÿ”„ Syncing version to package.runtime.json..." npm run sync:runtime-version