-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 930 Bytes
/
Copy pathvalidate-openapi.yml
File metadata and controls
33 lines (31 loc) · 930 Bytes
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
name: Validate OpenAPI spec
on:
push:
branches: [main]
paths: [spec/openapi.yaml]
workflow_dispatch: {}
jobs:
validate-spec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Validate specification
run: |
docker run --rm \
-v "${{ github.workspace }}:/local" \
openapitools/openapi-generator-cli validate \
-i /local/spec/openapi.yaml
test:
runs-on: ubuntu-latest
needs: validate-spec
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test