-
Notifications
You must be signed in to change notification settings - Fork 58
48 lines (38 loc) · 1.06 KB
/
api.yml
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
47
name: Validate API Spec
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'api/**'
- 'package.json'
- 'package-lock.json'
jobs:
typescript_api_spec_validation:
permissions:
contents: 'read'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@c2ac33f2c62f978d6c944d9648125a294e56dc0b # v4.0.2
with:
node-version: 'v20.12.0'
- name: Install tsp
run: npm install -g @typespec/[email protected]
- name: Install dependencies
run: npm ci
- name: Install autorest
run: npm install -g [email protected]
- name: make generate
run: make generate
working-directory: './api'
- name: Check for Uncommitted Changes
run: |
git diff --exit-code || (echo "::error::Uncommitted changes detected in OpenAPI spec. Please regenerate and commit them." && exit 1)