- Created StellaOps.Notify.Storage.Mongo project with initial configuration. - Added expected output files for acceptance tests (at1.txt to at10.txt). - Added fixture input files for acceptance tests (at1 to at10). - Created input and signature files for test cases fc1 to fc5.
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
name: oas-ci
|
|
on:
|
|
push:
|
|
paths:
|
|
- "src/Api/**"
|
|
- "scripts/api-*.mjs"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
pull_request:
|
|
paths:
|
|
- "src/Api/**"
|
|
- "scripts/api-*.mjs"
|
|
- "package.json"
|
|
- "package-lock.json"
|
|
|
|
jobs:
|
|
oas-validate:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Task Pack offline bundle fixtures
|
|
run: python3 scripts/packs/run-fixtures-check.sh
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "18"
|
|
|
|
- name: Install deps
|
|
run: npm install --ignore-scripts --no-progress
|
|
|
|
- name: Compose aggregate OpenAPI
|
|
run: npm run api:compose
|
|
|
|
- name: Lint (spectral)
|
|
run: npm run api:lint
|
|
|
|
- name: Validate examples coverage
|
|
run: npm run api:examples
|
|
|
|
- name: Compat 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 "[oas-ci] previous stella.yaml not found; skipping"
|
|
fi
|
|
|
|
- name: Contract tests
|
|
run: npm run api:compat:test
|
|
|
|
- name: Upload aggregate spec
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: stella-openapi
|
|
path: src/Api/StellaOps.Api.OpenApi/stella.yaml
|