Skip to content

Commit e8099f1

Browse files
authored
Merge pull request #1146 from ethereumjs/monorepo-add-util
Util monorepo transition
2 parents 892d332 + e3c5bba commit e8099f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+21025
-3093
lines changed

.github/workflows/node-versions.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ jobs:
7575
- name: Test Tx
7676
run: npm run test
7777
working-directory: packages/tx
78+
79+
- name: Test Util
80+
run: npm run test
81+
working-directory: packages/util
7882

7983
- name: Test VM
8084
run: npm run test:API

.github/workflows/trie-build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ jobs:
8080
if: steps.cache.outputs.cache-hit != 'true'
8181
working-directory: ${{github.workspace}}
8282

83+
# Builds current package and the ones it depends from.
84+
- run: npm run build:trie
85+
working-directory: ${{github.workspace}}
86+
8387
- run: npm run benchmarks | tee output.txt
8488
working-directory: ${{ env.cwd }}
8589

.github/workflows/util-build.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Util
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags:
7+
- '*'
8+
pull_request:
9+
types: [opened, reopened, synchronize]
10+
11+
env:
12+
cwd: ${{github.workspace}}/packages/util
13+
14+
defaults:
15+
run:
16+
working-directory: packages/util
17+
18+
jobs:
19+
test-util:
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
node-version: [12]
24+
steps:
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
- uses: actions/checkout@v2
30+
with:
31+
submodules: recursive
32+
33+
- name: Dependency cache
34+
uses: actions/cache@v2
35+
id: cache
36+
with:
37+
key: Util-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
38+
path: '**/node_modules'
39+
40+
# Installs root dependencies, ignoring Bootstrap All script.
41+
# Bootstraps the current package only
42+
- run: npm install --ignore-scripts && npm run bootstrap:util
43+
if: steps.cache.outputs.cache-hit != 'true'
44+
working-directory: ${{github.workspace}}
45+
46+
# Builds current package and the ones it depends from.
47+
- run: npm run build:util
48+
working-directory: ${{github.workspace}}
49+
50+
- run: npm run coverage
51+
52+
- uses: codecov/codecov-action@v1
53+
with:
54+
file: ${{ env.cwd }}/coverage/lcov.info
55+
flags: util
56+
if: ${{ matrix.node-version == 12 }}
57+
58+
- run: npm run lint

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This was originally the EthereumJS VM repository. On Q1 2020 we brought some of
2121
| [@ethereumjs/ethash][ethash-package] | [![NPM Package][ethash-npm-badge]][ethash-npm-link] | [![Ethash Issues][ethash-issues-badge]][ethash-issues-link] | [![Actions Status][ethash-actions-badge]][ethash-actions-link] | [![Code Coverage][ethash-coverage-badge]][ethash-coverage-link] |
2222
| [merkle-patricia-tree][trie-package] | [![NPM Package][trie-npm-badge]][trie-npm-link] | [![Trie Issues][trie-issues-badge]][trie-issues-link] | [![Actions Status][trie-actions-badge]][trie-actions-link] | [![Code Coverage][trie-coverage-badge]][trie-coverage-link]
2323
| [@ethereumjs/tx][tx-package] | [![NPM Package][tx-npm-badge]][tx-npm-link] | [![Tx Issues][tx-issues-badge]][tx-issues-link] | [![Actions Status][tx-actions-badge]][tx-actions-link] | [![Code Coverage][tx-coverage-badge]][tx-coverage-link] |
24+
| [ethereumjs-util][util-package] | [![NPM Package][util-npm-badge]][util-npm-link] | [![Util Issues][util-issues-badge]][util-issues-link] | [![Actions Status][util-actions-badge]][util-actions-link] | [![Code Coverage][util-coverage-badge]][util-coverage-link]
2425
| [@ethereumjs/vm][vm-package] | [![NPM Package][vm-npm-badge]][vm-npm-link] | [![VM Issues][vm-issues-badge]][vm-issues-link] | [![Actions Status][vm-actions-badge]][vm-actions-link] | [![Code Coverage][vm-coverage-badge]][vm-coverage-link] |
2526

2627
## Coverage report
@@ -259,6 +260,15 @@ If you want to join for work or do improvements on the libraries have a look at
259260
[trie-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Trie%22
260261
[trie-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/branch/master/graph/badge.svg?flag=trie
261262
[trie-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/tree/master/packages/trie
263+
[util-package]: ./packages/util
264+
[util-npm-badge]: https://img.shields.io/npm/v/ethereumjs-util.svg
265+
[util-npm-link]: https://www.npmjs.org/package/ethereumjs-util
266+
[util-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-monorepo/package:%20util?label=issues
267+
[util-issues-link]: https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+util"
268+
[util-actions-badge]: https://github.com/ethereumjs/ethereumjs-monorepo/workflows/Util/badge.svg
269+
[util-actions-link]: https://github.com/ethereumjs/ethereumjs-monorepo/actions?query=workflow%3A%22Util%22
270+
[util-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/branch/master/graph/badge.svg?flag=util
271+
[util-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/tree/master/packages/util
262272
[vm-package]: ./packages/vm
263273
[vm-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/vm.svg
264274
[vm-npm-link]: https://www.npmjs.com/package/@ethereumjs/vm

0 commit comments

Comments
 (0)