-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (39 loc) · 1.05 KB
/
lint.yml
File metadata and controls
46 lines (39 loc) · 1.05 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
name: Lint
on:
push:
branches: [ main ]
paths:
- 'openapi.yaml'
- 'docusaurus-docs/**/*.md'
- '.markdownlint.json'
pull_request:
branches: [ main ]
paths:
- 'openapi.yaml'
- 'docusaurus-docs/**/*.md'
- '.markdownlint.json'
# Allow manual triggering
workflow_dispatch:
jobs:
lint:
name: Lint Code & Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check combined schema
run: |
npm run build:openapi
if [ -n "$(git status --porcelain)" ]; then
echo "Error: Build produced uncommitted changes in openapi.yaml. Please rerun npm run build:openapi and commit the changes to the combined schema"
exit 1
fi
- name: Lint
run: npm run lint:openapi