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. A snapshot can be re-generated via `@github-actions regenerate snapshots` by a code owner.

The API conformance test will then re-run and pass.

Signed-off-by: Charlie Doern <cdoern@redhat.com>
This commit is contained in:
Charlie Doern 2025-09-24 16:21:42 -04:00
parent 0dbf79c328
commit af94606828
14 changed files with 2427 additions and 104 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/'
# never skip this, instead if a breaking change is properly identified -- we should regenerate our snapshot.
- name: Run Pydantic Model Test
run: |
uv run --no-sync ./scripts/snapshot-test.sh tests/api/test_pydantic_models.py
# Report when test is skipped
- name: Report skip reason
if: steps.skip-check.outputs.skip == 'true'