-
-
Notifications
You must be signed in to change notification settings - Fork 288
28 lines (25 loc) · 1 KB
/
validate-examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Validate AsyncAPI Examples
on:
push:
branches:
- script-ci-spec-validation # added temporarily for testing purpose
# - master
pull_request_target:
types: [opened, reopened, synchronize, edited, ready_for_review]
jobs:
validate-examples:
name: Validate Spec Examples
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install AsyncAPI CLI
run: npm install -g @asyncapi/cli
- name: Validate AsyncAPI documents
run: |
# 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