Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
ref: ${{ github.event.pull_request.base.ref }}
path: 'base'


# Cache oasdiff to avoid checksum failures and speed up builds
- name: Cache oasdiff
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably also support a force no-cache conformance check as well - we should probably run it at the time of release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but should I make this a separate action so it can be triggered by maintainers manually?

if: steps.skip-check.outputs.skip != 'true'
Expand Down Expand Up @@ -136,6 +137,23 @@ jobs:
run: |
oasdiff breaking --fail-on ERR $BASE_SPEC $CURRENT_SPEC --match-path '^/v1/'

# Run oasdiff to detect breaking changes in the API specification when compared to the OpenAI openAPI spec
- name: Run OpenAPI Breaking Change Diff Against OpenAI API
if: steps.skip-check.outputs.skip != 'true'
continue-on-error: true
shell: bash
run: |
OPENAI_SPEC=docs/static/openai-spec-2.3.0.yml
LLAMA_STACK_SPEC=docs/static/llama-stack-spec.yaml

# Compare Llama Stack spec against OpenAI spec.
# This finds breaking changes in our implementation of common endpoints.
# By using our spec as the base, we avoid errors for endpoints we don't implement.
oasdiff breaking --fail-on ERR \
"$LLAMA_STACK_SPEC" \
"$OPENAI_SPEC" \
--strip-prefix-base "/v1"

# Report when test is skipped
- name: Report skip reason
if: steps.skip-check.outputs.skip == 'true'
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ repos:
- id: no-commit-to-branch
- id: check-yaml
args: ["--unsafe"]
exclude: 'docs/static/openai-spec-2.3.0.yml'
- id: detect-private-key
- id: mixed-line-ending
args: [--fix=lf] # Forces to replace line ending by LF (line feed)
Expand Down
Loading
Loading