-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.08 KB
/
ci.yml
File metadata and controls
43 lines (40 loc) · 1.08 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
spec-validate:
name: OpenAPI spec validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: requirements-dev.txt
- name: Install
run: pip install -r requirements-dev.txt
- name: Validate openapi.yaml structure
run: |
python -c "
import yaml, openapi_spec_validator as v
v.validate(yaml.safe_load(open('openapi.yaml')))
print('openapi.yaml: structurally valid')
"
- name: Validate fixtures against spec schemas
run: python tests/validate.py
redocly-lint:
name: Redocly lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install redocly
run: npm install -g @redocly/cli@1
- name: Lint
run: redocly lint openapi.yaml