From 082ae94d49572465e340bd5dca17d506c808004e Mon Sep 17 00:00:00 2001 From: maskedwolf4 Date: Fri, 27 Dec 2024 21:57:24 +0530 Subject: [PATCH] Solving issue number #1080 which was showing deprecated output in console. It was solved by adding install.sh which is a script to hide the deprecated output and modified validate-examples.yml by giving cmd to run install.sh this solve the issue --- .github/workflows/validate-examples.yml | 4 +++- install.sh | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 install.sh diff --git a/.github/workflows/validate-examples.yml b/.github/workflows/validate-examples.yml index f6339ea8..210051f8 100644 --- a/.github/workflows/validate-examples.yml +++ b/.github/workflows/validate-examples.yml @@ -3,6 +3,7 @@ name: Validate AsyncAPI Examples on: pull_request_target: types: [opened, reopened, synchronize, edited, ready_for_review] + jobs: validate-examples: @@ -15,8 +16,9 @@ jobs: uses: actions/setup-node@v4 with: node-version: '20' + - name: Install AsyncAPI CLI - run: npm install -g @asyncapi/cli + run: npm install -g @asyncapi/cli && ./install.sh - name: Validate AsyncAPI documents run: | find examples -type f \( -name "*.yml" -o -name "*.yaml" \) -not -path 'examples/social-media/common/*' | xargs -P 10 -L 1 asyncapi validate diff --git a/install.sh b/install.sh new file mode 100644 index 00000000..308bcc7d --- /dev/null +++ b/install.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Capture the output of npm install +npm_install_output=$(npm install) + +# Remove deprecation warnings (example using sed) +modified_output=$(echo "$npm_install_output" | sed '/WARN/d') + +# Displaying the modified output +echo "$modified_output" + +# Optional: Adding success message +echo "Async API installed successfully!" \ No newline at end of file