1010 runs-on : ubuntu-latest
1111 steps :
1212 - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
1315
1416 # -------- pnpm + cache ----------
1517 - uses : pnpm/action-setup@v4
@@ -20,17 +22,22 @@ jobs:
2022 node-version : 20
2123 cache : ' pnpm'
2224
23- - run : pnpm install --frozen-lockfile
25+ # Try with --frozen-lockfile first, fallback to regular install if it fails
26+ - name : Install dependencies
27+ run : pnpm install --frozen-lockfile || pnpm install
28+
2429 - run : pnpm run lint
2530
2631 build :
2732 needs : lint
2833 runs-on : ubuntu-latest
2934 strategy :
3035 matrix :
31- node-version : [18.x, 20.x, 22.x] # stable Node versions
36+ node-version : [18.x, 20.x, 22.x]
3237 steps :
3338 - uses : actions/checkout@v4
39+ with :
40+ fetch-depth : 0
3441
3542 # -------- pnpm + cache ----------
3643 - uses : pnpm/action-setup@v4
@@ -41,14 +48,19 @@ jobs:
4148 node-version : ${{ matrix.node-version }}
4249 cache : ' pnpm'
4350
44- - run : pnpm install --frozen-lockfile
51+ # Try with --frozen-lockfile first, fallback to regular install if it fails
52+ - name : Install dependencies
53+ run : pnpm install --frozen-lockfile || pnpm install
54+
4555 - run : pnpm run build
4656
4757 test :
4858 needs : build
4959 runs-on : ubuntu-latest
5060 steps :
5161 - uses : actions/checkout@v4
62+ with :
63+ fetch-depth : 0
5264
5365 # -------- pnpm + cache ----------
5466 - uses : pnpm/action-setup@v4
5971 node-version : 20
6072 cache : ' pnpm'
6173
62- - run : pnpm install --frozen-lockfile
74+ # Try with --frozen-lockfile first, fallback to regular install if it fails
75+ - name : Install dependencies
76+ run : pnpm install --frozen-lockfile || pnpm install
77+
6378 - run : pnpm run test
0 commit comments