Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ethereumjs/ethereumjs-monorepo in…
Browse files Browse the repository at this point in the history
…to snap-sync-moving-root
  • Loading branch information
scorbajio committed Sep 13, 2024
2 parents a73b659 + 2cf4ddb commit 4058a27
Show file tree
Hide file tree
Showing 829 changed files with 54,209 additions and 55,830 deletions.
61 changes: 44 additions & 17 deletions .github/workflows/block-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
name: Block
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
inputs:
dep-cache-key:
required: true
type: string
submodule-cache-key:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

env:
cwd: ${{github.workspace}}/packages/block
Expand All @@ -15,32 +25,49 @@ defaults:
working-directory: packages/block

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-block
cancel-in-progress: true

jobs:
test-block:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
steps:
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4
with:
submodules: recursive

- name: Use Node.js ${{ matrix.node-version }}
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
- if: inputs.dep-cache-key != 'none'
uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
key: ${{ inputs.dep-cache-key }}

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: 'npm'

- run: npm ci --omit=peer
working-directory: ${{github.workspace}}
- name: Install Dependencies (if called from workflow_dispatch)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}

- if: inputs.submodule-cache-key != 'none'
uses: actions/cache/restore@v4
name: Initialize ethereum-tests
id: submodules-cache
with:
path: ${{github.workspace}}/packages/ethereum-tests
key: ${{ inputs.submodule-cache-key}}
fail-on-cache-miss: true

- run: npm run lint
- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
files: ${{ env.cwd }}/coverage/lcov.info
files: ${{ github.workspace}}/packages/block/coverage/lcov.info
flags: block
46 changes: 30 additions & 16 deletions .github/workflows/blockchain-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
name: Blockchain
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
inputs:
dep-cache-key:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

env:
cwd: ${{github.workspace}}/packages/blockchain
Expand All @@ -15,28 +22,35 @@ defaults:
working-directory: packages/blockchain

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-blockchain
cancel-in-progress: true

jobs:
test-blockchain:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v4
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
- uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
key: ${{ inputs.dep-cache-key }}

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: 'npm'

- run: npm ci --omit=peer
working-directory: ${{github.workspace}}

- run: npm run lint
- name: Install Dependencies (if called from workflow_dispatch)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}

- run: npm run coverage
- uses: codecov/codecov-action@v3
with:
Expand Down
59 changes: 45 additions & 14 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,68 @@
name: Browser
on:
push:
branches: [master, develop]
tags: ['*']
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
inputs:
dep-cache-key:
required: true
type: string
submodule-cache-key:
required: true
type: string
workflow_dispatch:
inputs:
dep-cache-key:
required: false
default: 'none'
submodule-cache-key:
required: false
default: 'none'

env:
cwd: ${{github.workspace}}

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-browser
cancel-in-progress: true

jobs:
test-all-browser:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
fail-fast: false
steps:
- uses: actions/checkout@v4
# We clone the repo and submodules if triggered from work-flow dispatch
- if: inputs.submodule-cache-key == 'none'
uses: actions/checkout@v4
with:
submodules: recursive # necessary for block tests to load ethereum/tests

- name: Use Node.js ${{ matrix.node-version }}
submodules: recursive

# We restore the code/deps from cache if triggered from workflow_call (i.e. have valid cache key)
- if: inputs.dep-cache-key != 'none'
uses: actions/cache/restore@v4
id: dep-cache
with:
path: ${{github.workspace}}
key: ${{ inputs.dep-cache-key }}

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: 'npm'

- run: npm ci
- name: Install Dependencies (if called from workflow_dispatch)
if: steps.dep-cache.outputs.cache-hit != 'true'
run: npm ci
working-directory: ${{ github.workspace }}

- if: inputs.submodule-cache-key != 'none'
uses: actions/cache/restore@v4
name: Restore ethereum-tests from cache if available
id: submodules-cache
with:
path: ${{github.workspace}}/packages/ethereum-tests
key: ${{ inputs.submodule-cache-key }}

- run: npm run install-browser-deps

- run: npm run test:browser --workspaces --if-present
Expand Down
Loading

0 comments on commit 4058a27

Please sign in to comment.