Skip to content
Merged
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
50 changes: 50 additions & 0 deletions .github/workflows/aimock-drift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: aimock fixture drift

on:
schedule:
- cron: '0 7 * * *'
workflow_dispatch:

jobs:
drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6.3.0
with:
node-version: 22
cache: npm
- run: npm ci
- name: Run drift check
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: npx nx run examples-chat-aimock-e2e:drift --skip-nx-cache
- name: Open issue on drift
if: failure()
uses: actions/github-script@v8
with:
script: |
const { owner, repo } = context.repo;
const today = new Date().toISOString().slice(0, 10);
const title = `aimock fixture drift detected — ${today}`;
const body = [
'The scheduled fixture drift check failed.',
'',
`Workflow run: ${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`,
'',
'Investigate which fixture drifted and either refresh it intentionally',
'or open a PR fixing the regression on the LLM side.',
].join('\n');
const existing = await github.rest.issues.listForRepo({
owner, repo, labels: 'aimock-drift', state: 'open',
});
if (existing.data.length === 0) {
await github.rest.issues.create({
owner, repo, title, body, labels: ['aimock-drift'],
});
} else {
await github.rest.issues.createComment({
owner, repo, issue_number: existing.data[0].number,
body: `Drift again on ${today}. ${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`,
});
}
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,32 @@ jobs:
run: uv sync
- run: npx nx run examples-chat-python:smoke --skip-nx-cache

examples-chat-aimock-e2e:
name: examples/chat — aimock e2e
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6.3.0
with:
node-version: 22
cache: npm
- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
python-version: '3.12'
- run: npm ci
- working-directory: examples/chat/python
run: uv sync
- run: npx playwright install --with-deps chromium
- run: npx nx run examples-chat-aimock-e2e:test --skip-nx-cache
- name: Upload Playwright trace on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: aimock-e2e-trace
path: examples/chat/aimock-e2e/test-results/
retention-days: 7

cockpit-e2e:
name: Cockpit — e2e
runs-on: ubuntu-latest
Expand Down Expand Up @@ -163,6 +189,7 @@ jobs:
cockpit-secret-integration,
cockpit-deploy-smoke,
examples-chat-smoke,
examples-chat-aimock-e2e,
cockpit-e2e,
website-e2e,
]
Expand Down
Loading
Loading