summaryrefslogtreecommitdiffstats
path: root/.github/workflows/linter.yml
blob: 64006df7fd1feac4da90d5c0ae02a59a39ce50a2 (plain) (blame)
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
---
name: Lint OpenAPI Descriptions

on:
  - push

jobs:
  lint:
    name: Lint releases
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        name: Install Python
        with:
          python-version: '3.12'
      - run: pip install yamllint
        name: Install yamllint
      - run: yamllint -f parsable -c .yamllint-config.yml descriptions/api.github.com/*.yaml
        name: Run yamllint on project descriptions
      - name: Install NodeJS
        uses: actions/setup-node@v4
        with:
          node-version: '16'
      - name: Install Node modules
        run: npm ci
      - name: JSON Lint
        run: npm run lint
      - name: OpenAPI Lint
        uses: mattpage/redocly-cli-lint-action@v0.0.1
        with:
          entrypoints: 'descriptions/**/*.yaml'
          config: '.redocly.yml'