Refactor code structure for improved readability and maintainability; removed redundant code blocks and optimized function calls.
This commit is contained in:
@@ -23,5 +23,27 @@ jobs:
|
||||
node-version: "18"
|
||||
- name: Install npm deps
|
||||
run: npm install --ignore-scripts --no-progress
|
||||
- name: Compose aggregate OpenAPI
|
||||
run: npm run api:compose
|
||||
- name: Validate examples coverage
|
||||
run: npm run api:examples
|
||||
- name: Compatibility diff (previous commit)
|
||||
run: |
|
||||
set -e
|
||||
if git show HEAD~1:src/Api/StellaOps.Api.OpenApi/stella.yaml > /tmp/stella-prev.yaml 2>/dev/null; then
|
||||
node scripts/api-compat-diff.mjs /tmp/stella-prev.yaml src/Api/StellaOps.Api.OpenApi/stella.yaml --output text --fail-on-breaking
|
||||
else
|
||||
echo "[api:compat] previous stella.yaml not found; skipping"
|
||||
fi
|
||||
- name: Compatibility diff (baseline)
|
||||
run: |
|
||||
set -e
|
||||
if [ -f src/Api/StellaOps.Api.OpenApi/baselines/stella-baseline.yaml ]; then
|
||||
node scripts/api-compat-diff.mjs src/Api/StellaOps.Api.OpenApi/baselines/stella-baseline.yaml src/Api/StellaOps.Api.OpenApi/stella.yaml --output text
|
||||
else
|
||||
echo "[api:compat] baseline file missing; skipping"
|
||||
fi
|
||||
- name: Generate changelog
|
||||
run: npm run api:changelog
|
||||
- name: Spectral lint (fail on warning+)
|
||||
run: npm run api:lint
|
||||
|
||||
Reference in New Issue
Block a user