Skip to content

Commit 29b624a

Browse files
committed
chore: attempt to fix some more ci actions
1 parent 1a7faf3 commit 29b624a

12 files changed

+266
-491
lines changed

.github/workflows/block-build.yml

Lines changed: 20 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -17,62 +17,42 @@ on:
1717
required: false
1818
default: 'none'
1919

20-
env:
21-
cwd: ${{github.workspace}}/packages/block
22-
23-
defaults:
24-
run:
25-
working-directory: packages/block
26-
2720
concurrency:
2821
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-block
2922
cancel-in-progress: true
3023

24+
env:
25+
CI: true
26+
3127
jobs:
3228
test-block:
33-
runs-on: ubuntu-latest
34-
steps:
35-
# We clone the repo and submodules if triggered from work-flow dispatch
36-
- if: inputs.submodule-cache-key == 'none'
29+
runs-on: ubuntu-24.04
30+
31+
steps:
32+
- name: Checkout repository
3733
uses: actions/checkout@v5
3834
with:
3935
submodules: recursive
4036

41-
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
42-
- if: inputs.dep-cache-key != 'none'
43-
uses: actions/cache/restore@v4
44-
id: dep-cache
37+
- name: Install pnpm
38+
uses: pnpm/action-setup@v4
4539
with:
46-
path: ${{github.workspace}}
47-
key: ${{ inputs.dep-cache-key }}
48-
49-
- uses: pnpm/action-setup@v4
50-
with:
51-
version: 10.5.2
5240
run_install: false
5341

54-
- name: Use Node.js 20
42+
- name: Setup Node.js
5543
uses: actions/setup-node@v5
5644
with:
57-
node-version: 20
45+
node-version: '20'
46+
cache: 'pnpm'
5847

59-
- name: Install Dependencies (if called from workflow_dispatch)
60-
if: steps.dep-cache.outputs.cache-hit != 'true'
61-
run: pnpm install --frozen-lockfile
48+
- name: Install dependencies (workspace root)
6249
working-directory: ${{ github.workspace }}
50+
run: pnpm install --frozen-lockfile
6351

64-
- if: inputs.submodule-cache-key != 'none'
65-
uses: actions/cache/restore@v4
66-
name: Initialize ethereum-tests
67-
id: submodules-cache
68-
with:
69-
path: ${{github.workspace}}/packages/ethereum-tests
70-
key: ${{ inputs.submodule-cache-key}}
71-
fail-on-cache-miss: true
52+
- name: Build @ethereumjs/block
53+
working-directory: ${{ github.workspace }}/packages/block
54+
run: pnpm run build
7255

73-
- run: pnpm run coverage
74-
- uses: codecov/codecov-action@v4
75-
with:
76-
token: ${{ secrets.CODECOV_TOKEN }}
77-
files: ${{ github.workspace}}/packages/block/coverage/lcov.info
78-
flags: block
56+
- name: Test @ethereumjs/block
57+
working-directory: ${{ github.workspace }}/packages/block
58+
run: pnpm run test

.github/workflows/blockchain-build.yml

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,49 +14,41 @@ on:
1414
required: false
1515
default: 'none'
1616

17-
env:
18-
cwd: ${{github.workspace}}/packages/blockchain
19-
20-
defaults:
21-
run:
22-
working-directory: packages/blockchain
23-
2417
concurrency:
2518
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-blockchain
2619
cancel-in-progress: true
2720

21+
env:
22+
CI: true
23+
2824
jobs:
2925
test-blockchain:
30-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-24.04
27+
3128
steps:
32-
# We clone the repo and submodules if triggered from work-flow dispatch
33-
- if: inputs.submodule-cache-key == 'none'
29+
- name: Checkout repository
3430
uses: actions/checkout@v5
31+
with:
32+
submodules: recursive
3533

36-
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
37-
- uses: actions/cache/restore@v4
38-
id: dep-cache
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@v4
3936
with:
40-
path: ${{github.workspace}}
41-
key: ${{ inputs.dep-cache-key }}
37+
run_install: false
4238

43-
- name: Use Node.js 20
39+
- name: Setup Node.js
4440
uses: actions/setup-node@v5
4541
with:
46-
node-version: 20
42+
node-version: '20'
4743
cache: 'pnpm'
4844

49-
- uses: pnpm/action-setup@v4
50-
with:
51-
version: 10.5.2
52-
run_install: false
53-
54-
- name: Install Dependencies (if called from workflow_dispatch)
55-
if: steps.dep-cache.outputs.cache-hit != 'true'
56-
run: pnpm install --frozen-lockfile
45+
- name: Install dependencies (workspace root)
5746
working-directory: ${{ github.workspace }}
47+
run: pnpm install --frozen-lockfile
5848

59-
- run: pnpm run coverage
49+
- name: Test @ethereumjs/blockchain
50+
working-directory: ${{ github.workspace }}/packages/blockchain
51+
run: pnpm run coverage
6052
- uses: codecov/codecov-action@v4
6153
with:
6254
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/client-build.yml

Lines changed: 19 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -14,92 +14,43 @@ on:
1414
required: false
1515
default: 'none'
1616

17-
18-
env:
19-
cwd: ${{github.workspace}}/packages/client
20-
21-
defaults:
22-
run:
23-
working-directory: packages/client
24-
2517
concurrency:
2618
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-client
2719
cancel-in-progress: true
2820

21+
env:
22+
CI: true
2923

3024
jobs:
3125
test-client:
3226
if: contains(join(github.event.pull_request.labels.*.name, ' '), 'test client')
33-
runs-on: ubuntu-latest
34-
steps:
35-
# We clone the repo and submodules if triggered from work-flow dispatch
36-
- if: inputs.submodule-cache-key == 'none'
37-
uses: actions/checkout@v5
38-
39-
- if: inputs.dep-cache-key != 'none'
40-
uses: actions/cache/restore@v4
41-
id: dep-cache
42-
with:
43-
path: ${{github.workspace}}
44-
key: ${{ inputs.dep-cache-key }}
45-
46-
- uses: pnpm/action-setup@v4
47-
with:
48-
version: 10.5.2
49-
run_install: false
50-
51-
- name: Use Node.js 20
52-
uses: actions/setup-node@v5
53-
with:
54-
node-version: 20
55-
56-
- name: Install Dependencies (if not restored from cache)
57-
if: steps.dep-cache.outputs.cache-hit != 'true'
58-
run: pnpm install --frozen-lockfile
59-
working-directory: ${{ github.workspace }}
60-
61-
- run: pnpm run coverage
62-
- uses: codecov/codecov-action@v4
63-
with:
64-
token: ${{ secrets.CODECOV_TOKEN }}
65-
files: ${{ env.cwd }}/coverage/lcov.info
66-
flags: client
27+
runs-on: ubuntu-24.04
6728

68-
- uses: nick-fields/retry@v2
69-
with:
70-
timeout_minutes: 10
71-
max_attempts: 3
72-
command: cd ${{github.workspace}}/packages/client && pnpm run test:integration
73-
74-
test-client-cli:
75-
runs-on: ubuntu-latest
76-
strategy:
77-
fail-fast: false
7829
steps:
79-
- if: inputs.submodule-cache-key == 'none'
30+
- name: Checkout repository
8031
uses: actions/checkout@v5
81-
82-
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
83-
- if: inputs.dep-cache-key != 'none'
84-
uses: actions/cache/restore@v4
85-
id: dep-cache
8632
with:
87-
path: ${{github.workspace}}
88-
key: ${{ inputs.dep-cache-key }}
33+
submodules: recursive
8934

90-
- uses: pnpm/action-setup@v4
35+
- name: Install pnpm
36+
uses: pnpm/action-setup@v4
9137
with:
92-
version: 10.5.2
9338
run_install: false
9439

95-
- name: Use Node.js 20
40+
- name: Setup Node.js
9641
uses: actions/setup-node@v5
9742
with:
98-
node-version: 20
43+
node-version: '20'
44+
cache: 'pnpm'
9945

100-
- name: Install Dependencies (if not restored from cache)
101-
if: steps.dep-cache.outputs.cache-hit != 'true'
102-
run: pnpm install --frozen-lockfile
46+
- name: Install dependencies (workspace root)
10347
working-directory: ${{ github.workspace }}
48+
run: pnpm install --frozen-lockfile
49+
50+
- name: Build @ethereumjs/client
51+
working-directory: ${{ github.workspace }}/packages/client
52+
run: pnpm run build
10453

105-
- run: cd ${{github.workspace}}/packages/client && npx vitest run test/cli/cli
54+
- name: Test @ethereumjs/client
55+
working-directory: ${{ github.workspace }}/packages/client
56+
run: pnpm run test

.github/workflows/common-build.yml

Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,63 +14,42 @@ on:
1414
required: false
1515
default: 'none'
1616

17-
env:
18-
cwd: ${{github.workspace}}/packages/common
19-
20-
defaults:
21-
run:
22-
working-directory: packages/common
23-
2417
concurrency:
2518
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-common
2619
cancel-in-progress: true
2720

21+
env:
22+
CI: true
23+
2824
jobs:
2925
test-common:
30-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-24.04
3127

3228
steps:
33-
# We clone the repo and submodules if triggered from work-flow dispatch
34-
- if: inputs.submodule-cache-key == 'none'
29+
- name: Checkout repository
3530
uses: actions/checkout@v5
36-
37-
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
38-
- if: inputs.dep-cache-key != 'none'
39-
uses: actions/cache/restore@v4
40-
id: dep-cache
4131
with:
42-
path: ${{github.workspace}}
43-
key: ${{ inputs.dep-cache-key }}
32+
submodules: recursive
4433

45-
- uses: pnpm/action-setup@v4
34+
- name: Install pnpm
35+
uses: pnpm/action-setup@v4
4636
with:
47-
version: 10.5.2
4837
run_install: false
4938

50-
- name: Use Node.js 20
39+
- name: Setup Node.js
5140
uses: actions/setup-node@v5
5241
with:
53-
node-version: 20
42+
node-version: '20'
43+
cache: 'pnpm'
5444

55-
- name: Install Dependencies (if not restored from cache)
56-
if: steps.dep-cache.outputs.cache-hit != 'true'
57-
run: pnpm install --frozen-lockfile
45+
- name: Install dependencies (workspace root)
5846
working-directory: ${{ github.workspace }}
47+
run: pnpm install --frozen-lockfile
5948

60-
# Run coverage for common
61-
- run: pnpm run coverage
62-
- uses: codecov/codecov-action@v4
63-
with:
64-
token: ${{ secrets.CODECOV_TOKEN }}
65-
files: ${{ env.cwd }}/coverage/lcov.info
66-
flags: common
49+
- name: Build @ethereumjs/common
50+
working-directory: ${{ github.workspace }}/packages/common
51+
run: pnpm run build
6752

68-
# Run coverage for util
69-
- run: pnpm run coverage
70-
working-directory: ${{ github.workspace }}/packages/util
71-
72-
- uses: codecov/codecov-action@v4
73-
with:
74-
token: ${{ secrets.CODECOV_TOKEN }}
75-
files: ${{ env.cwd }}/coverage/lcov.info
76-
flags: util
53+
- name: Test @ethereumjs/common
54+
working-directory: ${{ github.workspace }}/packages/common
55+
run: pnpm run test

0 commit comments

Comments
 (0)