-
Notifications
You must be signed in to change notification settings - Fork 66
36 lines (29 loc) · 1.01 KB
/
validate-descriptions.yml
File metadata and controls
36 lines (29 loc) · 1.01 KB
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
29
30
31
32
33
34
35
36
name: OpenAPI Parser Validation for latest OpenAPI docs
on:
push:
branches: [ main, support/v1, support/v2 ]
pull_request:
branches: [ main, support/v1, support/v2 ]
jobs:
list-descriptions:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-descriptions.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- id: set-descriptions
run: echo "::set-output name=matrix::$(ls test/**/Resources/*.{json,yaml} | sed 's/.*\///' | jq -R -s -c 'split("\n")[:-1]')"
build:
needs: list-descriptions
strategy:
matrix:
descriptions: ${{ fromJson(needs.list-descriptions.outputs.matrix) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Validate description with redocly
uses: fluximus-prime/redocly-cli-github-action@v1
with:
args: 'lint test/Microsoft.OpenAPI.OData.Reader.Tests/Resources/${{ matrix.descriptions }} --max-problems 1000 --config redocly.yaml'