Skip to content

Commit d32ce00

Browse files
committed
util -> monorepo transition: added CI configuration, fixed bootstrap and build
1 parent 6bbf14e commit d32ce00

File tree

4 files changed

+40
-16
lines changed

4 files changed

+40
-16
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/util-build.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,53 @@ on:
77
- '*'
88
pull_request:
99
types: [opened, reopened, synchronize]
10+
11+
env:
12+
cwd: ${{github.workspace}}/packages/util
13+
14+
defaults:
15+
run:
16+
working-directory: packages/util
17+
1018
jobs:
11-
test:
19+
test-util:
1220
runs-on: ubuntu-latest
1321
strategy:
1422
matrix:
15-
node-version: [10.x, 12.x, 13.x, 14.x]
23+
node-version: [12]
1624

1725
steps:
1826
- name: Use Node.js ${{ matrix.node-version }}
1927
uses: actions/setup-node@v1
2028
with:
2129
node-version: ${{ matrix.node-version }}
22-
2330
- uses: actions/checkout@v2
24-
- run: npm install
31+
with:
32+
submodules: recursive
33+
34+
- name: Dependency cache
35+
uses: actions/cache@v2
36+
id: cache
37+
with:
38+
key: Util-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
39+
path: '**/node_modules'
40+
41+
# Installs root dependencies, ignoring Bootstrap All script.
42+
# Bootstraps the current package only
43+
- run: npm install --ignore-scripts && npm run bootstrap:util
44+
if: steps.cache.outputs.cache-hit != 'true'
45+
working-directory: ${{github.workspace}}
46+
47+
# Builds current package and the ones it depends from.
48+
- run: npm run build:util
49+
working-directory: ${{github.workspace}}
2550

26-
- run: npm run lint
2751
- run: npm run coverage
2852

2953
- uses: codecov/codecov-action@v1
30-
if: matrix.node-version == '12.x'
3154
with:
32-
file: ./coverage/lcov.info
55+
file: ${{ env.cwd }}/coverage/lcov.info
56+
flags: util
57+
if: ${{ matrix.node-version == 12 }}
58+
59+
- run: npm run lint

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"bootstrap:ethash": "npm run bootstrap -- --scope @ethereumjs/ethash",
2323
"bootstrap:trie": "npm run bootstrap -- --scope merkle-patricia-tree",
2424
"bootstrap:tx": "npm run bootstrap -- --scope @ethereumjs/tx",
25+
"bootstrap:util": "npm run bootstrap -- --scope ethereumjs-util",
2526
"bootstrap:vm": "npm run bootstrap -- --scope @ethereumjs/vm",
2627
"build": "lerna run build --stream",
2728
"build:tree": "lerna run build --stream --include-dependencies",
@@ -33,6 +34,7 @@
3334
"build:ethash": "npm run build:tree -- --scope @ethereumjs/ethash",
3435
"build:trie": "npm run build:tree -- --scope merkle-patricia-tree",
3536
"build:tx": "npm run build:tree -- --scope @ethereumjs/tx",
37+
"build:util": "npm run build:tree -- --scope ethereumjs-util",
3638
"build:vm": "npm run build:tree -- --scope @ethereumjs/vm",
3739
"lint": "lerna run lint --stream --parallel -- --mode compact",
3840
"lint:fix": "lerna run lint:fix --stream --parallel",

packages/util/.github/contributing.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)