mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 11:26:02 +00:00
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:
@@ -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
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user