Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to npm workspaces #1394

Merged
merged 3 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 higher version of NPM
run: npm install -g [email protected]
CaptainIRS marked this conversation as resolved.
Show resolved Hide resolved
- 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 higher version of NPM
run: npm install -g [email protected]
CaptainIRS marked this conversation as resolved.
Show resolved Hide resolved
- 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 higher version of NPM
run: npm install -g [email protected]
CaptainIRS marked this conversation as resolved.
Show resolved Hide resolved
- 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 higher version of NPM
run: npm install -g [email protected]
- 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 higher version of NPM
run: npm install -g [email protected]
- 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 higher version of NPM
run: npm install -g [email protected]
- 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