Skip to content

Commit aeddc61

Browse files
cdoerniamemilio
authored andcommitted
fix: oasdiff enhancements and stability (llamastack#3419)
# What does this PR do? only run conformance tests when the spec is changed. Also, cache oasdiff such that it is not installed every time the test is run Signed-off-by: Charlie Doern <[email protected]>
1 parent fe6b5c0 commit aeddc61

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/conformance.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ on:
1313
branches: [ main ]
1414
types: [opened, synchronize, reopened]
1515
paths:
16-
- 'llama_stack/**'
17-
- '!llama_stack/ui/**'
18-
- 'tests/**'
19-
- 'uv.lock'
20-
- 'pyproject.toml'
16+
- 'docs/_static/llama-stack-spec.yaml'
17+
- 'docs/_static/llama-stack-spec.html'
2118
- '.github/workflows/conformance.yml' # This workflow itself
2219

2320
concurrency:
@@ -43,10 +40,27 @@ jobs:
4340
ref: ${{ github.event.pull_request.base.ref }}
4441
path: 'base'
4542

43+
# Cache oasdiff to avoid checksum failures and speed up builds
44+
- name: Cache oasdiff
45+
id: cache-oasdiff
46+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809
47+
with:
48+
path: ~/oasdiff
49+
key: oasdiff-${{ runner.os }}
50+
4651
# Install oasdiff: https://github.com/oasdiff/oasdiff, a tool for detecting breaking changes in OpenAPI specs.
4752
- name: Install oasdiff
53+
if: steps.cache-oasdiff.outputs.cache-hit != 'true'
4854
run: |
4955
curl -fsSL https://raw.githubusercontent.com/oasdiff/oasdiff/main/install.sh | sh
56+
cp /usr/local/bin/oasdiff ~/oasdiff
57+
58+
# Setup cached oasdiff
59+
- name: Setup cached oasdiff
60+
if: steps.cache-oasdiff.outputs.cache-hit == 'true'
61+
run: |
62+
sudo cp ~/oasdiff /usr/local/bin/oasdiff
63+
sudo chmod +x /usr/local/bin/oasdiff
5064
5165
# Run oasdiff to detect breaking changes in the API specification
5266
# This step will fail if incompatible changes are detected, preventing breaking changes from being merged

0 commit comments

Comments
 (0)