Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,39 @@ on:
- push

jobs:
build:
name: Lint OpenAPI Descriptions
lint:
name: Lint OpenAPI ${{matrix.version}} releases
runs-on: ubuntu-latest
strategy:
matrix:
include:
- version: '3.0'
files: 'descriptions/**/*.yaml'
- version: '3.1'
files: 'descriptions-next/**/*.yaml'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Yaml Lint
uses: karancode/[email protected]
- uses: actions/setup-python@v5
name: Install Python
with:
yamllint_file_or_dir: 'descriptions/**/*.yaml'
yamllint_strict: false
yamllint_config_filepath: '.yamllint-config.yml'
yamllint_comment: true
- uses: actions/setup-node@v3
python-version: '3.12'
- run: pip install yamllint
name: Install yamllint
- run: yamllint -f parsable -c .yamllint-config.yml ${{matrix.files}}
name: Run yamllint on ${{matrix.version}} descriptions
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: '16'
- run: npm install
- name: Install Node modules
run: npm ci
# TODO: update script to pass in {{files}} so that this can support 3.1
- name: JSON Lint
run: npm run lint
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 this command is also hard-coded to run with descriptions

"lint": "eslint descriptions/**/*.json --ext .json"

- name: OpenAPI Lint
uses: mattpage/[email protected]
with:
# TODO: use matrix.files variable when workflow is ready to process 3.1 files
entrypoints: 'descriptions/**/*.yaml'
config: '.redocly.yml'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
Loading