Some checks failed
LNM Migration CI / build-runner (push) Has been cancelled
Ledger OpenAPI CI / deprecation-check (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
Airgap Sealed CI Smoke / sealed-smoke (push) Has been cancelled
Ledger Packs CI / build-pack (push) Has been cancelled
Export Center CI / export-ci (push) Has been cancelled
Ledger OpenAPI CI / validate-oas (push) Has been cancelled
Ledger OpenAPI CI / check-wellknown (push) Has been cancelled
Ledger Packs CI / verify-pack (push) Has been cancelled
LNM Migration CI / validate-metrics (push) Has been cancelled
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
82 lines
2.3 KiB
YAML
82 lines
2.3 KiB
YAML
name: Ledger OpenAPI CI
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'api/ledger/**'
|
|
- 'ops/devops/ledger/**'
|
|
pull_request:
|
|
paths:
|
|
- 'api/ledger/**'
|
|
|
|
jobs:
|
|
validate-oas:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install tools
|
|
run: |
|
|
npm install -g @stoplight/spectral-cli
|
|
npm install -g @openapitools/openapi-generator-cli
|
|
|
|
- name: Validate OpenAPI spec
|
|
run: |
|
|
chmod +x ops/devops/ledger/validate-oas.sh
|
|
ops/devops/ledger/validate-oas.sh
|
|
|
|
- name: Upload validation report
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ledger-oas-validation-${{ github.run_number }}
|
|
path: |
|
|
out/ledger/oas/lint-report.json
|
|
out/ledger/oas/validation-report.txt
|
|
out/ledger/oas/spec-summary.json
|
|
if-no-files-found: warn
|
|
|
|
check-wellknown:
|
|
runs-on: ubuntu-22.04
|
|
needs: validate-oas
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check .well-known/openapi structure
|
|
run: |
|
|
# Validate .well-known structure if exists
|
|
if [ -d ".well-known" ]; then
|
|
echo "Checking .well-known/openapi..."
|
|
if [ -f ".well-known/openapi.json" ]; then
|
|
python3 -c "import json; json.load(open('.well-known/openapi.json'))"
|
|
echo ".well-known/openapi.json is valid JSON"
|
|
fi
|
|
else
|
|
echo "[info] .well-known directory not present (OK for dev)"
|
|
fi
|
|
|
|
deprecation-check:
|
|
runs-on: ubuntu-22.04
|
|
needs: validate-oas
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Check deprecation policy
|
|
run: |
|
|
if [ -f "ops/devops/ledger/deprecation-policy.yaml" ]; then
|
|
echo "Validating deprecation policy..."
|
|
python3 -c "import yaml; yaml.safe_load(open('ops/devops/ledger/deprecation-policy.yaml'))"
|
|
echo "Deprecation policy is valid"
|
|
else
|
|
echo "[info] No deprecation policy yet (OK for initial setup)"
|
|
fi
|