From cb7d0706469c1c5d6cea5952d73e9c5746dfb9bb Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Tue, 9 Apr 2024 01:12:09 +0530 Subject: [PATCH] fix: update bash script, pipe `xargs` Changes: - applied Sergio's suggestion from: https://github.com/asyncapi/spec/pull/1046/files#r1555684920 - added comment as to why we're skipping the mentioned directory --- .github/workflows/validate-examples.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-examples.yml b/.github/workflows/validate-examples.yml index fa227e31..624e0cf1 100644 --- a/.github/workflows/validate-examples.yml +++ b/.github/workflows/validate-examples.yml @@ -24,4 +24,5 @@ jobs: run: npm install -g @asyncapi/cli - name: Validate AsyncAPI documents run: | - find examples/ \( -path 'examples/social-media/*' -prune \) -o -type f \( -name "*.yml" -o -name "*.yaml" \) -exec asyncapi validate {} \; +# NOTE: we've excluded the files inside `examples/social-media/common` folder because it contains partial documents which don't comply with the asyncapi document format, hence these files give error during the validation. + find examples -type f \( -name "*.yml" -o -name "*.yaml" \) -not -path 'examples/social-media/common/*' | xargs -P 10 -L 1 asyncapi validate \ No newline at end of file