Skip to content

Commit 22da1c8

Browse files
committed
add strategy matrix and perform 3.1 linting for yaml releases
1 parent c9590a0 commit 22da1c8

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/linter.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,15 @@ on:
66

77
jobs:
88
lint:
9-
name: Lint releases
9+
name: Lint OpenAPI ${{matrix.version}} releases
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
include:
14+
- version: '3.0'
15+
files: 'descriptions/**/*.yaml'
16+
- version: '3.1'
17+
files: 'descriptions-next/**/*.yaml'
1118
steps:
1219
- name: Checkout Code
1320
uses: actions/checkout@v4
@@ -17,8 +24,8 @@ jobs:
1724
python-version: '3.12'
1825
- run: pip install yamllint
1926
name: Install yamllint
20-
- run: yamllint -f parsable -c .yamllint-config.yml descriptions/api.github.com/*.yaml
21-
name: Run yamllint on project descriptions
27+
- run: yamllint -f parsable -c .yamllint-config.yml ${{matrix.files}}
28+
name: Run yamllint on ${{matrix.version}} descriptions
2229
- name: Install NodeJS
2330
uses: actions/setup-node@v4
2431
with:
@@ -30,5 +37,6 @@ jobs:
3037
- name: OpenAPI Lint
3138
uses: mattpage/redocly-cli-lint-action@v0.0.1
3239
with:
40+
# TODO: use matrix.files variable when workflow is ready to process 3.1 files
3341
entrypoints: 'descriptions/**/*.yaml'
3442
config: '.redocly.yml'

0 commit comments

Comments
 (0)