Skip to content

Commit

Permalink
Migrate to npm workspaces
Browse files Browse the repository at this point in the history
Signed-off-by: CaptainIRS <[email protected]>
  • Loading branch information
CaptainIRS committed Jul 20, 2022
1 parent 78e4e84 commit 1f10160
Show file tree
Hide file tree
Showing 14 changed files with 63,446 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .build/benchmark-integration-test-direct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -e
set -o pipefail

# Bootstrap the project again
npm i && npm run repoclean -- --yes && npm run bootstrap
npm ci

# Get the root directory of the caliper source
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
Expand Down
4 changes: 2 additions & 2 deletions .build/checks-and-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ set -o pipefail
./scripts/check-package-names.sh

# Bootstrap the project again
npm i && npm run repoclean -- --yes && npm run bootstrap
npm ci

pushd ./packages/caliper-publish/
./publish.js version check
popd

# Run linting, license check and unit tests
npm test
npm run test --workspaces
2 changes: 1 addition & 1 deletion .build/publish-caliper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ cp ./README.md ./packages/caliper-fabric/README.md
cp ./README.md ./packages/caliper-fisco-bcos/README.md

cd ./packages/caliper-publish/
npm i
npm ci
./publish.js npm
./publish.js docker --publish
10 changes: 10 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install latest NPM
run: npm install -g npm@latest
- name: Fabric Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
Expand All @@ -33,6 +35,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install latest NPM
run: npm install -g npm@latest
- name: Ethereum Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
Expand All @@ -50,6 +54,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install latest NPM
run: npm install -g npm@latest
- name: Besu Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
Expand All @@ -67,6 +73,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install latest NPM
run: npm install -g npm@latest
- name: FISCO BCOS Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
Expand All @@ -84,6 +92,8 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install latest NPM
run: npm install -g npm@latest
- name: Generator Integration Test
run: .build/benchmark-integration-test-direct.sh
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install latest NPM
run: npm install -g npm@latest
- name: Check correct usage of Caliper package names
run: ./scripts/check-package-names.sh
- name: Install project dependencies
run: npm install
- name: Bootstrap lerna
run: npm run bootstrap
run: npm ci
- name: Check the version consistency of subpackages
run: ./packages/caliper-publish/publish.js version check
- name: Run unit tests
run: npm test
run: npm test --workspaces
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ architecture.pptx
output.log
lerna-debug.log

**/package-lock.json

.idea/
**/node_modules/
**/log/
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ You can find the following main component types at the root of the repository:
* [.build/](.build/)
* [scripts/](scripts/)
* [azure-pipelines.yml](azure-pipelines.yml)
* [lerna.json](lerna.json)
* [package.json](package.json)
* Main code-based components of Caliper in the [packages/](packages/) directory

Expand Down
21 changes: 0 additions & 21 deletions lerna.json

This file was deleted.

Loading

0 comments on commit 1f10160

Please sign in to comment.