mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-19 06:23:32 +00:00
🧑🍳 ci: Provision Redis Tools for Quality Reports (#18172)
Co-authored-by: Lia <lia@librechat.ai>
This commit is contained in:
parent
461a4c2c52
commit
1da68ffa4c
2 changed files with 29 additions and 0 deletions
7
.github/workflows/change-quality.yml
vendored
7
.github/workflows/change-quality.yml
vendored
|
|
@ -14,6 +14,7 @@ on:
|
|||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
- '.github/actions/mongodb-binary/**'
|
||||
- '.github/actions/redis-binaries/**'
|
||||
- 'packages/data-schemas/src/postgres/**'
|
||||
- 'packages/data-schemas/src/types/favorite*'
|
||||
- 'packages/data-schemas/src/methods/favorite*'
|
||||
|
|
@ -131,6 +132,8 @@ jobs:
|
|||
--strict --types node scripts/quality/*.mts
|
||||
- name: Test change selection and metrics
|
||||
run: node --test scripts/crap.test.mts scripts/quality/*.test.mts
|
||||
- name: Test Redis binary provisioning
|
||||
run: node --test .github/actions/redis-binaries/provision.test.mjs
|
||||
|
||||
select:
|
||||
needs: [request]
|
||||
|
|
@ -288,6 +291,10 @@ jobs:
|
|||
cache-dependency-path: |
|
||||
source/package-lock.json
|
||||
tooling/package-lock.json
|
||||
- name: Provision Redis tools for API coverage
|
||||
if: matrix.workspace == 'api' && matrix.task.check == 'risk'
|
||||
timeout-minutes: 8
|
||||
uses: ./tooling/.github/actions/redis-binaries
|
||||
- run: npm ci
|
||||
- name: Install quality tooling
|
||||
working-directory: tooling
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ interface Step {
|
|||
with?: Record<string, string | number | boolean>;
|
||||
env?: Record<string, string>;
|
||||
'working-directory'?: string;
|
||||
'timeout-minutes'?: number;
|
||||
}
|
||||
interface Job {
|
||||
env?: Record<string, string>;
|
||||
|
|
@ -180,6 +181,27 @@ test('PR updates retain PostgreSQL contracts without starting source quality rep
|
|||
assert.equal(report.steps[prewarm].with?.['working-directory'], 'source');
|
||||
});
|
||||
|
||||
test('API risk coverage provisions pinned host Redis before executing source tests', () => {
|
||||
const provision = report.steps.findIndex(
|
||||
({ uses }) => uses === './tooling/.github/actions/redis-binaries',
|
||||
);
|
||||
const node = report.steps.findIndex(({ uses }) => uses === 'actions/setup-node@v5');
|
||||
const tooling = report.steps.findIndex(({ name }) => name === 'Check out quality tooling');
|
||||
assert.ok(provision > node && provision > tooling, 'trusted provisioning needs Node and tooling');
|
||||
assert.ok(provision < report.steps.indexOf(runner), 'test fixtures need host Redis on PATH');
|
||||
assert.equal(
|
||||
report.steps[provision].if,
|
||||
"matrix.workspace == 'api' && matrix.task.check == 'risk'",
|
||||
);
|
||||
assert.equal(report.steps[provision]['timeout-minutes'], 8);
|
||||
assert.ok(
|
||||
workflow.jobs.verify.steps.some(
|
||||
({ run }) => run === 'node --test .github/actions/redis-binaries/provision.test.mjs',
|
||||
),
|
||||
);
|
||||
assert.ok(workflow.on.pull_request?.paths.includes('.github/actions/redis-binaries/**'));
|
||||
});
|
||||
|
||||
test('comment commands from humans and bots reach trusted admission before report jobs', () => {
|
||||
const request = workflow.jobs.request;
|
||||
assert.equal(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue