diff --git a/.build/benchmark-integration-test-direct.sh b/.build/benchmark-integration-test-direct.sh new file mode 100755 index 000000000..ea8cd1ffd --- /dev/null +++ b/.build/benchmark-integration-test-direct.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Exit on first error, print all commands. +set -e +set -o pipefail + +# Bootstrap the project again +npm ci + +# Get the root directory of the caliper source +ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" +echo $ROOT_DIR + +# Call the CLI directly in the source tree +export CALL_METHOD="node $ROOT_DIR/packages/caliper-cli/caliper.js" +# Use explicit binding for +export BIND_IN_PACKAGE_DIR=true + +# Create a directory outside of the source code tree to install SUT binding node modules +# We have to do this otherwise npm will attempt to hoist the npm modules to a directory +# which subsequently doesn't get searched +# This approach means we can drop having to declare dependencies on SUT bound modules in the +# connector and makes it more like the way a user would use caliper. +export SUT_DIR=$HOME/sut +echo $SUT_DIR +mkdir -p $SUT_DIR + +# Ensure node searches this directory by setting NODE_PATH +export NODE_PATH=$SUT_DIR/node_modules + +echo "---- Running Integration test for adaptor ${BENCHMARK}" +cd ./packages/caliper-tests-integration/ +./run-tests.sh + +rm -fr $SUT_DIR diff --git a/.build/check-prerequisites.sh b/.build/check-prerequisites.sh new file mode 100755 index 000000000..d13b40731 --- /dev/null +++ b/.build/check-prerequisites.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Exit on first error, print all commands. +set -e +set -o pipefail + +CLEAR="$(tput sgr0)" +RED="$(tput setaf 1)" +GREEN="$(tput setaf 2)" + +check_npm_version() { + required_version="11.5.1" + installed_version=$(npm --version) + versions="$required_version\n$installed_version" + if echo -e $versions | sort -rV | head -n 1 | grep -q "$installed_version"; then + echo "$GREEN npm version $installed_version is >= $required_version $CLEAR" + return 0 + else + echo "$RED npm version $installed_version < $required_version $CLEAR" + echo "$RED Please update npm to the latest version: https://docs.npmjs.com/try-the-latest-stable-version-of-npm $CLEAR" + return 1 + fi +} + +check_node_version() { + required_version="22.20.0" + installed_version=$(node --version | cut -c2-) + versions="$required_version\n$installed_version" + if echo -e $versions | sort -rV | head -n 1 | grep -q "$installed_version"; then + echo "$GREEN node version $installed_version is >= $required_version $CLEAR" + return 0 + else + echo "$RED node version $installed_version < $required_version $CLEAR" + echo "$RED Please update node to the latest version: https://nodejs.org/en/download/ $CLEAR" + return 1 + fi +} + +check_node_version +rc=$? +check_npm_version +rc=$?||$rc +if [ $rc -ne 0 ]; then + exit $rc +fi diff --git a/.build/checks-and-unit-tests.sh b/.build/checks-and-unit-tests.sh new file mode 100755 index 000000000..2ab04534b --- /dev/null +++ b/.build/checks-and-unit-tests.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Exit on first error, print all commands. +set -e +set -o pipefail + +# check reference Caliper package names +./scripts/check-package-names.sh + +# Bootstrap the project again +npm ci + +pushd ./packages/caliper-publish/ +./publish.js version check +popd + +# Run linting, license check and unit tests +npm run test --workspaces diff --git a/.build/publish-caliper.sh b/.build/publish-caliper.sh new file mode 100755 index 000000000..5ecf98c55 --- /dev/null +++ b/.build/publish-caliper.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Exit on first error +set -e + +# distribute root README file before publishing +cp ./README.md ./packages/caliper-cli/README.md +cp ./README.md ./packages/caliper-core/README.md +cp ./README.md ./packages/caliper-fabric/README.md + +# distribute root package-lock file as npm-shrinkwrap file to packages before publishing +cp ./package-lock.json ./packages/caliper-cli/npm-shrinkwrap.json +cp ./package-lock.json ./packages/caliper-core/npm-shrinkwrap.json +cp ./package-lock.json ./packages/caliper-fabric/npm-shrinkwrap.json + +cd ./packages/caliper-publish/ +npm ci + +./publish.js npm +./publish.js docker --publish diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..7e7be2b96 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +{ + "name": "Caliper Development", + "image": "mcr.microsoft.com/vscode/devcontainers/python:3.11", + "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": false + }, + "ghcr.io/devcontainers/features/node:1": { + "version": "v22.20.0" + } + }, + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "python.defaultInterpreterPath": "/usr/local/bin/python" + }, + "extensions": [ + "esbenp.prettier-vscode", + ] + } + }, + "postCreateCommand": "cd docs && pip install -r pip-requirements.txt && mkdocs build", + "remoteUser": "vscode", + "forwardPorts": [8000] +} \ No newline at end of file diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..e6e514c9f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,26 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.eslintignore b/.eslintignore index 4ef815604..af75eb853 100644 --- a/.eslintignore +++ b/.eslintignore @@ -22,3 +22,4 @@ node_modules # Plugins /src/gui +/src/adapters/fabric/ChannelSignedTransaction.js diff --git a/.eslintrc.yml b/.eslintrc.yml deleted file mode 100644 index 6ef5e947f..000000000 --- a/.eslintrc.yml +++ /dev/null @@ -1,48 +0,0 @@ -env: - es6: true - node: true - mocha: true -extends: 'eslint:recommended' -parserOptions: - ecmaVersion: 8 - sourceType: - - script -rules: - indent: - - error - - 4 - linebreak-style: - - error - - unix - quotes: - - error - - single - semi: - - error - - always - no-unused-vars: - - error - - args: none - no-console: warn - curly: error - eqeqeq: error - no-throw-literal: error - strict: error - no-var: error - dot-notation: error - no-tabs: error - no-trailing-spaces: error - no-use-before-define: error - no-useless-call: error - no-with: error - operator-linebreak: error - require-jsdoc: - - error - - require: - ClassDeclaration: true - MethodDefinition: true - FunctionDeclaration: true - valid-jsdoc: - - error - - requireReturn: false - yoda: error diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 000000000..e3d440e33 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,88 @@ +name: Bug Report +description: File a bug report +body: + - type: markdown + attributes: + value: Thank you for helping us make Caliper better by submitting a bug report! + - type: markdown + attributes: + value: "## Environment information" + - type: input + id: caliper_version + attributes: + label: Which Caliper version are you using? + placeholder: "For example: v0.4.2, or latest" + validations: + required: true + - type: input + id: nodejs_version + attributes: + label: Which Node.JS version are you using? + placeholder: "For example: v10" + validations: + required: true + - type: input + id: os + attributes: + label: Which operating system are you using? + placeholder: "For example: Ubuntu 20.04 LTS" + validations: + required: true + - type: markdown + attributes: + value: "## Behavior information" + - type: textarea + id: context + attributes: + label: Please provide some context for your error. For example, when did the error occur? What were you trying to achieve, and how? + placeholder: "For example: I tried to monitor remote Docker containers..." + validations: + required: true + - type: textarea + id: actual_behavior + attributes: + label: What was the observed incorrect behavior? + placeholder: "For example: Caliper hangs and waits for submitted transactions indefinitely." + validations: + required: true + - type: textarea + id: error_log + attributes: + label: Please provide the error logs and their surroundings. + placeholder: "Error logs" + render: text + validations: + required: true + - type: textarea + id: bench_config + attributes: + label: Please provide your benchmark configuration file content, if possible. + placeholder: "test: ..." + render: yaml + validations: + required: false + - type: textarea + id: network_config + attributes: + label: Please provide your network configuration file content, if possible. + placeholder: "name: Fabric ..." + render: yaml + validations: + required: false + - type: textarea + id: workload + attributes: + label: Please provide your workload module content, if possible. + placeholder: "JS file content" + render: nodejs + validations: + required: false + - type: markdown + attributes: + value: "## Additional information" + - type: textarea + id: additional + attributes: + label: Please provide any additional information you deem relevant to the error. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..9c1b85a14 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: true +contact_links: + - name: Hyperledger Discord + url: https://discord.com/channels/905194001349627914/941417677778473031 + about: Please ask general questions about the project in the Caliper channel (Discord id required). + - name: Hyperledger Caliper mailing list + url: https://lists.hyperledger.org/g/caliper + about: Please ask general questions about the project here (LFID recommended). \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 000000000..17a121eee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,31 @@ +name: Feature Request +description: Request a new Caliper feature +labels: [enhancement] +body: + - type: markdown + attributes: + value: Thank you for sharing your ideas about how to improve Caliper! + - type: textarea + id: limitation + attributes: + label: Please share the technical limitation of Caliper that you encountered. + validations: + required: true + - type: textarea + id: feature + attributes: + label: Please detail your feature idea that could alleviate the limitation. + validations: + required: true + - type: textarea + id: context + attributes: + label: Please share some details about your use case if possible, and how the new feature would make Caliper a better performance benchmarking framework. + validations: + required: false + - type: textarea + id: suggestions + attributes: + label: Please share any suggestions about the new feature's code/configuration API (using formatted YAML segments or pseudo-code). + validations: + required: false \ No newline at end of file diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 000000000..c2e50f827 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,32 @@ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 30 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: +- bug +- documentation +- enhancement +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..fb42d488d --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,24 @@ +name: Coverage Reports + +on: + workflow_call: + +jobs: + coverage: + name: Coverage Reports + runs-on: ubuntu-latest + strategy: + matrix: + package: [caliper-core, caliper-fabric] + steps: + - uses: actions/checkout@v3 + - name: Download coverage reports artifact + uses: actions/download-artifact@v4.1.8 + with: + name: coverage-reports + path: packages + - name: Upload coverage reports + uses: codecov/codecov-action@v3.1.0 + with: + files: packages/${{ matrix.package }}/coverage/clover.xml + flags: ${{ matrix.package }} diff --git a/.github/workflows/dci.yml b/.github/workflows/dci.yml new file mode 100644 index 000000000..7eb4588f9 --- /dev/null +++ b/.github/workflows/dci.yml @@ -0,0 +1,18 @@ +# Taken from https://github.com/petermetz/gh-action-dci-lint +name: DCI + +on: + workflow_call: + +jobs: + DCI-lint: + name: DCI-Lint + runs-on: ubuntu-latest + steps: + - name: Lint Git Repo + id: lint-git-repo + uses: petermetz/gh-action-dci-lint@v0.6.1 + with: + lint-git-repo-request: '{"cloneUrl": "${{ github.server_url }}/${{ github.repository }}.git", "fetchArgs": ["--no-tags", "--prune", "--progress", "--no-recurse-submodules", "--depth=1", "origin" ,"+${{ github.sha }}:${{ github.ref }}"], "checkoutArgs": [ "${{ github.ref }}"], "targetPhrasePatterns": [], "configDefaultsUrl": "https://inclusivenaming.org/json/dci-lint-config-recommended-v1.json" }' + - name: Get the output response + run: echo "${{ steps.lint-git-repo.outputs.lint-git-repo-response }}" \ No newline at end of file diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml new file mode 100644 index 000000000..228719c2f --- /dev/null +++ b/.github/workflows/integration-tests.yml @@ -0,0 +1,78 @@ +name: Integration Tests + +on: + workflow_call: + +env: + NPM_VERSION: 11.5.1 + +jobs: + changes: + name: Check for changes + runs-on: ubuntu-latest + outputs: + adaptor: ${{ steps.filter.outputs.changes }} + steps: + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + fabric: + - 'packages/caliper-cli/**' + - 'packages/caliper-core/**' + - 'packages/caliper-fabric/**' + - 'packages/caliper-publish/**' + - 'packages/caliper-tests-integration/fabric_tests/**' + - '.github/workflows/integration-tests.yml' + - 'package-lock.json' + + integration-tests: + needs: changes + if: ${{ needs.changes.outputs.adaptor != '[]' && needs.changes.outputs.adaptor != '' }} + name: Integration Tests + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + adaptor: ${{ fromJSON(needs.changes.outputs.adaptor) }} + node-version: [22.x, 24.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install higher version of NPM + run: npm install -g npm@${{ env.NPM_VERSION }} + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + with: + path: | + node_modules + packages/*/node_modules + key: ${{ matrix.node-version }}-npm-cache-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ matrix.node-version }}-npm-cache- + - name: Cache SUT binding + id: cache-sut + uses: actions/cache@v3 + with: + path: /tmp/sut/cached + key: ${{ format('{0}-sut-cache-{1}-{2}', matrix.node-version, matrix.adaptor, hashFiles(format('packages/caliper-tests-integration/{0}_tests/run.sh', matrix.adaptor))) }} + restore-keys: | + ${{ matrix.node-version }}-sut-cache-${{ matrix.adaptor }}- + - name: Install project dependencies + if: steps.cache-npm.outputs.cache-hit != 'true' + run: npm ci + - name: Create directory to store SUT bindings + if: steps.cache-sut.outputs.cache-hit != 'true' + run: mkdir -p /tmp/sut + - name: Run integration tests + run: ./run-tests.sh + working-directory: ./packages/caliper-tests-integration/ + env: + BENCHMARK: ${{ matrix.adaptor }} + CALL_METHOD: "node ${{ github.workspace }}/packages/caliper-cli/caliper.js" + BIND_IN_PACKAGE_DIR: "true" + SUT_DIR: "/tmp/sut" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..d6424f882 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,18 @@ +name: CI (Publish) + +on: + push: + branches: [ "main" ] + +jobs: + unit-tests: + uses: ./.github/workflows/unit-tests.yml + coverage: + uses: ./.github/workflows/coverage.yml + needs: unit-tests + publish-caliper: + uses: ./.github/workflows/publish.yml + needs: unit-tests + secrets: + DOCKER_USER: ${{ secrets.DOCKER_USER }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 000000000..35b77add1 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,18 @@ +name: CI (PR) + +on: + pull_request: + branches: [ "main" ] + +jobs: + dci-lint: + uses: ./.github/workflows/dci.yml + unit-tests: + uses: ./.github/workflows/unit-tests.yml + needs: dci-lint + coverage: + uses: ./.github/workflows/coverage.yml + needs: unit-tests + integration-tests: + uses: ./.github/workflows/integration-tests.yml + needs: unit-tests diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..5d3f91e13 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Publish + +on: + workflow_call: + secrets: + DOCKER_TOKEN: + required: true + DOCKER_USER: + required: true + +permissions: + id-token: write # Required for OIDC + contents: read + +jobs: + publish-caliper: + name: Publish Caliper + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Use Node.js 22.x + uses: actions/setup-node@v4 + with: + node-version: 22.x + # anchor to the smallest npm version supporting trusted publishing + - name: Update npm + run: npm install -g npm@11.5.1 + - name: Publish Caliper + run: .build/publish-caliper.sh + env: + DOCKER_USER: ${{ secrets.DOCKER_USER }} + DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 000000000..3304123b1 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,49 @@ +name: Unit Tests + +on: + workflow_call: + +env: + NPM_VERSION: 11.5.1 + +jobs: + unit-tests: + name: Unit Tests + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [22.x, 24.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install higher version of NPM + run: npm install -g npm@${{ env.NPM_VERSION }} + - name: Cache node modules + id: cache-npm + uses: actions/cache@v3 + with: + path: | + node_modules + packages/*/node_modules + key: ${{ matrix.node-version }}-npm-cache-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ matrix.node-version }}-npm-cache- + - name: Check correct usage of Caliper package names + run: ./scripts/check-package-names.sh + - name: Install project dependencies + if: steps.cache-npm.outputs.cache-hit != 'true' + 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 --workspaces + - name: Upload coverage reports artifact + if: matrix.node-version == '22.x' + uses: actions/upload-artifact@v4.4.0 + with: + name: coverage-reports + path: packages/*/coverage/clover.xml + if-no-files-found: warn diff --git a/.gitignore b/.gitignore index 914247c6a..6eb5ab850 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,51 @@ -architecture.pptx -.idea/* *.bak -zookeeper.out -node_modules/* -package-lock.json -output.log -# Ignore any generted html files +# Ignore any generated html files, but include the report html template *.html +!/packages/caliper-core/lib/manager/report/template/report.html + # Ignore DS_Store files from Mac **.DS_Store -# Ignore any composer logs -composer-logs/ +architecture.pptx +output.log +lerna-debug.log + +.idea/ +**/node_modules/ +**/log/ +**/*.log # Ignore code coverage logs -.nyc_output/ -coverage/ +**/.nyc_output/ +**/coverage/ + +# Ignore IDE files +.vscode/ -# We prefer to not use lock files -package-lock.json +# Website files +.sass-cache/ +Gemfile.lock +_site/ -# Ignore zookeeper files -zookeeper.out +# verdaccio files +**/storage -# Ignore IDE files -.vscode/* \ No newline at end of file +# pm2 files +**/.pm2/ + +# lerna log +lerna-debug.log + +# contract address file +**/*.address + +# Ignore data +data/ + +# Ignore temp test files +temp/ + +# Build files of doc +docs/build/ diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..b6f27f135 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9cdd36d3d..000000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: node_js -node_js: -- '8' -matrix: - include: - - env: BENCHMARK=composer VERSION=0.19 - - env: BENCHMARK=drm VERSION=1.0.5 - - env: BENCHMARK=simple VERSION=1.0.5 -dist: trusty -before_install: | - set -ev - set -o pipefail - npm install -g @alrra/travis-scripts - -script: ./.travis/script.sh - -cache: - directories: - - node_modules -sudo: required -notifications: - webhooks: - on_success: always # default: always - on_failure: always # default: always - on_start: always # default: never - on_cancel: always # default: always - on_error: always # default: always \ No newline at end of file diff --git a/.travis/script.sh b/.travis/script.sh deleted file mode 100755 index 1adda6a40..000000000 --- a/.travis/script.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Exit on first error, print all commands. -set -ev -set -o pipefail - -echo "---- Running benchmark ${BENCHMARK}" -echo "---- Target version ${VERSION}" - -# Run benchmark -if [ "${BENCHMARK}" == "composer" ]; then - # Run version - if [ "${VERSION}" == "0.19" ]; then - npm install composer-admin@">=0.19.0 <0.20.0" - npm install composer-client@">=0.19.0 <0.20.0" - npm install composer-common@">=0.19.0 <0.20.0" - npm install fabric-client@1.1.0 - npm run test -- composer - else - echo "Unknown version ${VERSION} for benchmark ${BENCHMARK}" - exit 1 - fi -elif [ "${BENCHMARK}" == "drm" ]; then - npm install grpc@1.10.1 - npm install fabric-ca-client@1.1.0 - npm install fabric-client@1.1.0 - npm run test -- drm -elif [ "${BENCHMARK}" == "simple" ]; then - npm install grpc@1.10.1 - npm install fabric-ca-client@1.1.0 - npm install fabric-client@1.1.0 - npm run test -- simple -else - echo "Unknown target benchmark ${BENCHMARK}" - exit 1 -fi - -echo "---- Script complete" -exit \ No newline at end of file diff --git a/0.7.0/404.html b/0.7.0/404.html new file mode 100755 index 000000000..ca29ee8ba --- /dev/null +++ b/0.7.0/404.html @@ -0,0 +1 @@ +