fix(ci): install stats deps in release builds

This commit is contained in:
2026-03-18 02:37:58 -07:00
parent 48f10dbb03
commit ec56970646
2 changed files with 24 additions and 6 deletions

View File

@@ -89,14 +89,17 @@ jobs:
path: | path: |
~/.bun/install/cache ~/.bun/install/cache
node_modules node_modules
stats/node_modules
vendor/texthooker-ui/node_modules vendor/texthooker-ui/node_modules
vendor/subminer-yomitan/node_modules vendor/subminer-yomitan/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'vendor/texthooker-ui/package.json', 'vendor/subminer-yomitan/package-lock.json') }} key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'stats/bun.lock', 'vendor/texthooker-ui/package.json', 'vendor/subminer-yomitan/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-bun- ${{ runner.os }}-bun-
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: |
bun install --frozen-lockfile
cd stats && bun install --frozen-lockfile
- name: Build texthooker-ui - name: Build texthooker-ui
run: | run: |
@@ -144,9 +147,10 @@ jobs:
path: | path: |
~/.bun/install/cache ~/.bun/install/cache
node_modules node_modules
stats/node_modules
vendor/texthooker-ui/node_modules vendor/texthooker-ui/node_modules
vendor/subminer-yomitan/node_modules vendor/subminer-yomitan/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'vendor/texthooker-ui/package.json', 'vendor/subminer-yomitan/package-lock.json') }} key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'stats/bun.lock', 'vendor/texthooker-ui/package.json', 'vendor/subminer-yomitan/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-bun- ${{ runner.os }}-bun-
@@ -171,7 +175,9 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: |
bun install --frozen-lockfile
cd stats && bun install --frozen-lockfile
- name: Build texthooker-ui - name: Build texthooker-ui
run: | run: |
@@ -216,14 +222,17 @@ jobs:
path: | path: |
~/.bun/install/cache ~/.bun/install/cache
node_modules node_modules
stats/node_modules
vendor/texthooker-ui/node_modules vendor/texthooker-ui/node_modules
vendor/subminer-yomitan/node_modules vendor/subminer-yomitan/node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'vendor/texthooker-ui/package.json', 'vendor/subminer-yomitan/package-lock.json') }} key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock', 'stats/bun.lock', 'vendor/texthooker-ui/package.json', 'vendor/subminer-yomitan/package-lock.json') }}
restore-keys: | restore-keys: |
${{ runner.os }}-bun- ${{ runner.os }}-bun-
- name: Install dependencies - name: Install dependencies
run: bun install --frozen-lockfile run: |
bun install --frozen-lockfile
cd stats && bun install --frozen-lockfile
- name: Build texthooker-ui - name: Build texthooker-ui
shell: powershell shell: powershell

View File

@@ -28,6 +28,15 @@ test('release workflow verifies generated config examples before packaging artif
assert.match(releaseWorkflow, /bun run verify:config-example/); assert.match(releaseWorkflow, /bun run verify:config-example/);
}); });
test('release build jobs install and cache stats dependencies before packaging', () => {
assert.match(releaseWorkflow, /build-linux:[\s\S]*stats\/node_modules/);
assert.match(releaseWorkflow, /build-macos:[\s\S]*stats\/node_modules/);
assert.match(releaseWorkflow, /build-windows:[\s\S]*stats\/node_modules/);
assert.match(releaseWorkflow, /build-linux:[\s\S]*cd stats && bun install --frozen-lockfile/);
assert.match(releaseWorkflow, /build-macos:[\s\S]*cd stats && bun install --frozen-lockfile/);
assert.match(releaseWorkflow, /build-windows:[\s\S]*cd stats && bun install --frozen-lockfile/);
});
test('release workflow generates release notes from committed changelog output', () => { test('release workflow generates release notes from committed changelog output', () => {
assert.match(releaseWorkflow, /bun run changelog:release-notes/); assert.match(releaseWorkflow, /bun run changelog:release-notes/);
assert.ok(!releaseWorkflow.includes('git log --pretty=format:"- %s"')); assert.ok(!releaseWorkflow.includes('git log --pretty=format:"- %s"'));