-
Notifications
You must be signed in to change notification settings - Fork 45
55 lines (45 loc) · 1.93 KB
/
metadata-parser-validation.yml
File metadata and controls
55 lines (45 loc) · 1.93 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Metadata Parser Validation for latest XSLT rules
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
list-conversion-settings:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-conversion-settings.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- id: set-conversion-settings
run: echo "matrix=$(ls conversion-settings/*.json | sed 's/.*\///' | sed 's/\.[^.]*$//' | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
build:
needs: list-conversion-settings
strategy:
fail-fast: false
matrix:
version: ["v1.0", "beta"]
settings: ${{ fromJson(needs.list-conversion-settings.outputs.matrix) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v5.1.0
with:
dotnet-version: 9.x
- run: dotnet tool install --global Microsoft.OpenApi.Hidi --version 1.6.24
name: Install Hidi
- name: Validate latest XSLT rules
run: ./scripts/run-metadata-validation.ps1 -repoDirectory "${{ github.workspace }}" -version "${{ matrix.version }}" -platformName "${{ matrix.settings }}"
shell: pwsh
- name: Validate description with redocly
uses: fluximus-prime/redocly-cli-github-action@v1
with:
args: 'lint transformed_${{ matrix.version }}_${{ matrix.settings }}_metadata.yml --skip-rule operation-4xx-response --skip-rule no-server-trailing-slash --skip-rule no-unused-components --skip-rule security-defined --skip-rule info-license-url --skip-rule info-license --skip-rule no-empty-servers --skip-rule operation-summary --skip-rule tag-description --max-problems 1000'
- uses: actions/upload-artifact@v6
if: always()
with:
name: ${{ matrix.version }}-${{ matrix.settings }}
path: transformed_${{ matrix.version }}_${{ matrix.settings }}_metadata.yml