Skip to content

Commit 7e6a2b6

Browse files
committed
让出口代理实测进入持续集成
1 parent f2b8232 commit 7e6a2b6

3 files changed

Lines changed: 34 additions & 1 deletion

File tree

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ jobs:
185185
fi
186186
node scripts/run-workspace-tests-parallel.mjs --concurrency=3 --workspaces="$WORKSPACES"
187187
188+
- name: Run live Eval egress proxy test
189+
if: contains(steps.plan.outputs.standard_workspaces, 'packages/eval')
190+
env:
191+
MAKA_EVAL_EGRESS_PROXY_TEST: '1'
192+
run: |
193+
docker pull python:3.12-slim
194+
docker build \
195+
--tag maka-eval-egress-proxy:12.2.3 \
196+
--file packages/eval/harbor/egress-proxy/Dockerfile \
197+
packages/eval/harbor
198+
npm --workspace @maka/eval run test:egress-proxy:live
199+
188200
- name: Run Runtime Host tests
189201
if: steps.plan.outputs.runtime_host == 'true'
190202
run: npm --workspace @maka/runtime-host run test:dist

‎packages/eval/package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"clean": "node ../../scripts/clean-paths.mjs dist tsconfig.tsbuildinfo",
3535
"build": "tsc -p tsconfig.json",
3636
"typecheck": "tsc -p tsconfig.json --noEmit",
37-
"test:dist": "node --test \"dist/**/*.test.js\" && python3 harbor/test_eval_framework.py && python3 harbor/test_relay_contract.py && python3 harbor/test_relay_lifecycle.py && python3 harbor/test_egress_filter.py && python3 harbor/test_run_trial_policy.py && python3 harbor/test_relay_artifacts.py && python3 harbor/test_cell_egress_namespace.py && python3 harbor/test_egress_filter_live.py"
37+
"test:dist": "node --test \"dist/**/*.test.js\" && python3 harbor/test_eval_framework.py && python3 harbor/test_relay_contract.py && python3 harbor/test_relay_lifecycle.py && python3 harbor/test_egress_filter.py && python3 harbor/test_run_trial_policy.py && python3 harbor/test_relay_artifacts.py && python3 harbor/test_cell_egress_namespace.py",
38+
"test:egress-proxy:live": "python3 harbor/test_egress_filter_live.py"
3839
},
3940
"dependencies": {
4041
"@maka/core": "0.1.0",

‎scripts/ci-test-plan.test.mjs‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,26 @@ test('workflows never persist the job credential into the checkout', () => {
349349
}
350350
});
351351

352+
test('core CI runs the live Eval proxy lifecycle when Eval is selected', () => {
353+
const workflow = readWorkflow('ci.yml');
354+
const evalPackage = JSON.parse(
355+
readFileSync(new URL('../packages/eval/package.json', import.meta.url), 'utf8'),
356+
);
357+
358+
assert.match(
359+
workflow,
360+
/if: contains\(steps\.plan\.outputs\.standard_workspaces, 'packages\/eval'\)/u,
361+
);
362+
assert.match(workflow, /MAKA_EVAL_EGRESS_PROXY_TEST: '1'/u);
363+
assert.match(workflow, /docker build[\s\S]*maka-eval-egress-proxy:12\.2\.3/u);
364+
assert.match(workflow, /npm --workspace @maka\/eval run test:egress-proxy:live/u);
365+
assert.equal(
366+
evalPackage.scripts['test:egress-proxy:live'],
367+
'python3 harbor/test_egress_filter_live.py',
368+
);
369+
assert.doesNotMatch(evalPackage.scripts['test:dist'], /test_egress_filter_live\.py/u);
370+
});
371+
352372
const WORKFLOW_DIR = new URL('../.github/workflows/', import.meta.url);
353373

354374
function readWorkflow(name) {

0 commit comments

Comments
 (0)