Skip to content

Commit 3abe05c

Browse files
Update test-cache-restore.yml
1 parent f74377d commit 3abe05c

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

.github/workflows/test-cache-restore.yml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,6 @@ jobs:
1919
with:
2020
node-version: '21'
2121

22-
# Normalize runner.arch to lowercase (same as Go)
23-
- name: Normalize runner architecture (Linux/macOS)
24-
if: runner.os != 'Windows'
25-
shell: bash
26-
run: |
27-
echo "ARCH=$(echo '${{ runner.arch }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
28-
29-
- name: Normalize runner architecture (Windows)
30-
if: runner.os == 'Windows'
31-
shell: pwsh
32-
run: |
33-
$arch = "${{ runner.arch }}".ToLower()
34-
echo "ARCH=$arch" | Out-File $env:GITHUB_ENV -Append
35-
36-
# Detect package-manager and cache location (Node equivalent of `go env`)
37-
- name: Set Node cache variables
38-
shell: bash
39-
run: |
40-
const fs = require('fs');
41-
const { execSync } = require('child_process');
42-
43-
let cache;
44-
45-
if (fs.existsSync('pnpm-lock.yaml')) {
46-
cache = execSync('pnpm store path').toString().trim();
47-
} else if (fs.existsSync('yarn.lock')) {
48-
cache = execSync('yarn cache dir').toString().trim();
49-
} else {
50-
cache = execSync('npm config get cache').toString().trim();
51-
}
52-
53-
fs.appendFileSync(process.env.GITHUB_ENV, `NODE_CACHE=${cache}\n`);
54-
5522
# Restore Node cache (mirrors Restore Go cache)
5623
- name: Restore Node cache
5724
id: node-cache

0 commit comments

Comments
 (0)