fix(cli): tests read opencv.js from a CI cache, never a CDN mid-test (#7968)

* fix(cli): tests read opencv.js from a CI cache, never a CDN mid-test

* chore(ci): re-pin the cli test job after its opencv cache step

* chore(cli): one-line note on the opencv cache copy
This commit is contained in:
Miguel Ángel
2026-11-18 02:02:15 +00:00
committed by GitHub
parent c569417bb5
commit e6cee094b1
8 changed files with 61 additions and 24 deletions
@@ -0,0 +1,15 @@
name: Cache opencv.js for the CLI tests
description: >-
Restore opencv.js and the face models into ~/.cache/hyperframes/opencv, where the CLI tests copy them from.
On a cache miss, fetch them once with opencv.ts's own pins, before any test runs.
runs:
using: composite
steps:
- id: cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/hyperframes/opencv
key: opencv-${{ runner.os }}-${{ hashFiles('packages/cli/src/measure/opencv.ts') }}
- if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: node --import tsx packages/cli/scripts/prepare-test-opencv.mjs
+1
View File
@@ -612,6 +612,7 @@ jobs:
with:
lfs: true
- uses: ./.github/actions/setup-test-workspace
- uses: ./.github/actions/opencv-test-cache
- run: bun run --filter '@hyperframes/cli' test --shard=${{ matrix.shard }}/2
test-support:
+3
View File
@@ -504,6 +504,9 @@ jobs:
bun run --filter '@hyperframes/{parsers,lint,studio-server}' build
bun run --cwd packages/core build
- if: contains(matrix.packages, '@hyperframes/cli')
uses: ./.github/actions/opencv-test-cache
- name: Prepare browser for process tests
if: matrix.process_tests
shell: pwsh