-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.7 KB
/
Copy pathvalidate-codegen.yml
File metadata and controls
55 lines (47 loc) · 1.7 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
47
48
49
50
51
52
53
54
55
name: Validate Codegen Harness
on:
workflow_dispatch: {}
pull_request:
paths:
- "assets/specs/openapi/**/*.yml"
- "assets/specs/openapi/**/*.yaml"
- "scripts/codegen_harness.sh"
- ".github/workflows/validate-codegen.yml"
push:
paths:
- "assets/specs/openapi/**/*.yml"
- "assets/specs/openapi/**/*.yaml"
- "scripts/codegen_harness.sh"
- ".github/workflows/validate-codegen.yml"
jobs:
harness:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Setup Python (for possible future checks)
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install CLI tools (Prism, OpenAPI Generator, jq/yq)
run: |
npm i -g @stoplight/prism-cli@5 @openapitools/openapi-generator-cli@2
sudo apt-get update
sudo apt-get install -y jq
VERSION=$(curl -sL https://api.github.com/repos/mikefarah/yq/releases/latest | jq -r '.tag_name' | tr -d 'v')
curl -L "https://github.com/mikefarah/yq/releases/download/v${VERSION}/yq_linux_amd64" -o yq && chmod +x yq && sudo mv yq /usr/local/bin/yq
echo "node $(node -v)"; echo "npm $(npm -v)"; prism --version; openapi-generator-cli version; yq --version; jq --version
- name: Run Codegen Harness
run: |
bash scripts/codegen_harness.sh
- name: Upload harness logs (always)
if: always()
uses: actions/upload-artifact@v4
with:
name: codegen-harness-logs
path: .harness_logs/**