Skip to content

Commit 74da309

Browse files
committed
chore: test alternative ci
1 parent 972a843 commit 74da309

File tree

1 file changed

+22
-33
lines changed

1 file changed

+22
-33
lines changed

.github/workflows/binarytree-build.yml

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -14,56 +14,45 @@ on:
1414
required: false
1515
default: 'none'
1616

17-
env:
18-
cwd: ${{github.workspace}}/packages/binarytree
19-
20-
# Removed defaults.run.working-directory - commands run from root with pnpm filters
17+
# No default working-directory — we install at the repo root on purpose
2118

2219
concurrency:
2320
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-binarytree
2421
cancel-in-progress: true
2522

2623
jobs:
2724
test-binarytree:
28-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-24.04
2926

3027
steps:
31-
# We clone the repo and submodules if triggered from work-flow dispatch
32-
- if: inputs.submodule-cache-key == 'none'
33-
uses: actions/checkout@v4
34-
35-
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
36-
- if: inputs.dep-cache-key != 'none'
37-
uses: actions/cache/restore@v4
38-
id: dep-cache
28+
# Always check out the repository (don't rely on restoring the whole workspace from cache)
29+
- uses: actions/checkout@v5
3930
with:
40-
path: ${{github.workspace}}
41-
key: ${{ inputs.dep-cache-key }}
31+
submodules: recursive
4232

43-
- uses: pnpm/action-setup@v4
33+
# Install pnpm first so setup-node's cache: 'pnpm' can find it
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@v4
4436
with:
45-
version: 10.5.2
37+
# Use 'auto' if your root package.json has: { "packageManager": "pnpm@<version>" }
38+
version: auto
4639
run_install: false
4740

48-
- name: Use Node.js 20
41+
- name: Setup Node.js 20 (with pnpm store cache)
4942
uses: actions/setup-node@v5
5043
with:
51-
node-version: 20
44+
node-version: '20'
5245
cache: 'pnpm'
5346

54-
- name: Sanity check repo root
55-
run: |
56-
pwd
57-
ls -la
58-
test -f package.json && echo "Found package.json at root" || (echo "Missing package.json at root" && exit 1)
59-
test -f pnpm-workspace.yaml && echo "Found pnpm-workspace.yaml" || echo "No pnpm-workspace.yaml (ok if not a workspace)"
60-
pnpm -v
61-
command -v pnpm
62-
63-
- name: Install Dependencies (if not restored from cache)
64-
if: steps.dep-cache.outputs.cache-hit != 'true'
65-
run: pnpm install --frozen-lockfile --prefer-offline
47+
# Install dependencies from the WORKSPACE ROOT
48+
- name: Install dependencies (workspace)
6649
working-directory: ${{ github.workspace }}
50+
run: pnpm install --frozen-lockfile
51+
52+
# Build only the binarytree package
53+
- name: Build @ethereumjs/binarytree
54+
run: pnpm -w -r --filter "@ethereumjs/binarytree" run build
6755

68-
- name: Test binarytree
69-
run: pnpm -w -r --filter @ethereumjs/binarytree run test
56+
# Test only the binarytree package
57+
- name: Test @ethereumjs/binarytree
58+
run: pnpm -w -r --filter "@ethereumjs/binarytree" run test

0 commit comments

Comments
 (0)