feat(api): ensure StackRunConfig

StackRunConfig is part of our public API, ensure stability of this datatype using a pytest snapshot test.

If the pydantic model changes, it will fail.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-09-24 16:21:42 -04:00
parent d266c59c2a
commit e408fd3421
11 changed files with 2052 additions and 1 deletions

View file

@ -40,6 +40,11 @@ jobs:
with:
fetch-depth: 0
- name: Install dependencies
uses: ./.github/actions/setup-runner
with:
python-version: "3.12"
# Check if we should skip conformance testing due to breaking changes
- name: Check if conformance test should be skipped
id: skip-check
@ -137,6 +142,11 @@ jobs:
run: |
oasdiff breaking --fail-on ERR $BASE_SPEC $CURRENT_SPEC --match-path '^/v1/'
- name: Run Pydantic Model Test
if: steps.skip-check.outputs.skip != 'true'
run: |
uv run --no-sync ./scripts/api-conformance.sh tests/api/test_models.py
# Report when test is skipped
- name: Report skip reason
if: steps.skip-check.outputs.skip == 'true'