From b785935251bb3c6bbd964c94c7ebc7943c7823f4 Mon Sep 17 00:00:00 2001 From: Peter Somogyvari Date: Sat, 8 Jul 2023 01:08:20 -0700 Subject: [PATCH] test: yarn build cache trying things out #2 Signed-off-by: Peter Somogyvari --- .github/workflows/ci.yaml | 554 +++++++++--------- package.json | 33 +- ...ugin-ledger-connector-quorum-0-7-0.test.ts | 8 +- .../cactus-plugin-htlc-eth-besu/foundry.toml | 6 +- .../package.json | 3 +- .../package.json | 2 +- .../run-transaction-with-identities.test.ts | 2 +- .../run-transaction-with-ws-ids.test.ts | 2 +- .../integration/identity-client.test.ts | 2 +- .../package.json | 2 +- ...nerate-and-send-signed-transaction.test.ts | 2 +- .../iroha-iroha-transfer-example.test.ts | 2 +- .../iroha-socketio-endpoint.test.ts | 2 +- .../openapi/openapi-validation.test.ts | 2 +- .../run-transaction-endpoint-v1.test.ts | 2 +- .../package.json | 1 + tools/ci.sh | 87 +-- yarn.lock | 18 +- 18 files changed, 347 insertions(+), 383 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a92c79dda9d..84bbdd47d75 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,8 @@ jobs: TAPE_TEST_RUNNER_DISABLED: true TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true CUSTOM_CHECKS_DISABLED: true + CONFIGURE_DISABLED: false + CHECK_WORK_TREE_STATUS_DISABLED: true runs-on: ubuntu-20.04 steps: - name: Use Node.js v16.14.2 @@ -27,23 +29,38 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - run: ./tools/ci.sh + - id: yarn-cache name: Initialize Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ./.yarn/ restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - # lint clean codegen + + - id: pkg-dist-cache + name: Initialize Typescript Cache + uses: actions/cache@v3.3.1 + with: + key: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + path: | + .build-cache/ + **/dist/ + !**/node_modules/** + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + + - if : ${{ (steps.yarn-cache.outputs.cache-hit != 'true') || (steps.pkg-dist-cache.outputs.cache-hit != 'true') }} + name: tools_ci_sh + run: ./tools/ci.sh + yarn_lint: continue-on-error: false env: DEV_BUILD_DISABLED: false FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: false + JEST_TEST_RUNNER_DISABLED: true + TAPE_TEST_RUNNER_DISABLED: true TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true CUSTOM_CHECKS_DISABLED: true needs: build-dev @@ -56,23 +73,24 @@ jobs: - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ./.yarn/ restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: yarn install --mode=skip-build + - run: ./tools/ci.sh - run: yarn lint yarn_codegen: continue-on-error: false env: DEV_BUILD_DISABLED: false FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: false + JEST_TEST_RUNNER_DISABLED: true + TAPE_TEST_RUNNER_DISABLED: true TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true CUSTOM_CHECKS_DISABLED: true + CONFIGURE_DISABLED: false needs: build-dev runs-on: ubuntu-20.04 steps: @@ -81,28 +99,27 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ./.yarn/ restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: yarn install --mode=skip-build + - run: ./tools/ci.sh - run: yarn codegen yarn_custom_checks: continue-on-error: false env: DEV_BUILD_DISABLED: false FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: false + JEST_TEST_RUNNER_DISABLED: true + TAPE_TEST_RUNNER_DISABLED: true TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true - CUSTOM_CHECKS_DISABLED: true + CUSTOM_CHECKS_DISABLED: false + CONFIGURE_DISABLED: false needs: build-dev runs-on: ubuntu-20.04 steps: @@ -113,23 +130,23 @@ jobs: - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ./.yarn/ restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: yarn install - - run: yarn custom-checks + - run: ./tools/ci.sh yarn_tools_validate_bundle_names: continue-on-error: false env: DEV_BUILD_DISABLED: false FULL_BUILD_DISABLED: true - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: false - TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true + JEST_TEST_RUNNER_DISABLED: true + TAPE_TEST_RUNNER_DISABLED: true + TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: false CUSTOM_CHECKS_DISABLED: true + CONFIGURE_DISABLED: false needs: build-dev runs-on: ubuntu-20.04 steps: @@ -140,14 +157,13 @@ jobs: - uses: actions/checkout@v3.5.2 - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ./.yarn/ restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - - run: yarn install --mode=skip-build - - run: yarn tools:validate-bundle-names + - run: ./tools/ci.sh cactus-api-client: continue-on-error: false env: @@ -165,14 +181,27 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ./.yarn/ restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + + - id: pkg-dist-cache + name: Initialize Typescript Cache + uses: actions/cache@v3.3.1 + with: + key: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + path: | + .build-cache/ + **/dist/ + !**/node_modules/** + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + - run: ./tools/ci.sh cactus-cmd-api-server: continue-on-error: false @@ -192,17 +221,27 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + + - id: pkg-dist-cache + name: Initialize Typescript Cache + uses: actions/cache@v3.3.1 + with: + key: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + path: | + .build-cache/ + **/dist/ + !**/node_modules/** + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + - run: ./tools/ci.sh cactus-cmd-socketio-server: continue-on-error: false @@ -219,18 +258,29 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + + - id: pkg-dist-cache + name: Initialize Typescript Cache + uses: actions/cache@v3.3.1 + with: + key: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + path: | + .build-cache/ + **/dist/ + !**/node_modules/** + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + - run: ./tools/ci.sh + cactus-common: continue-on-error: false env: @@ -248,17 +298,27 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} + + - id: pkg-dist-cache + name: Initialize Typescript Cache + uses: actions/cache@v3.3.1 + with: + key: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + path: | + .build-cache/ + **/dist/ + !**/node_modules/** + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ github.sha }} + - run: ./tools/ci.sh cactus-core: continue-on-error: false @@ -275,17 +335,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-core-api: continue-on-error: false @@ -302,17 +360,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-example-carbon-accounting-backend: continue-on-error: false @@ -330,17 +386,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-example-carbon-accounting-business-logic-plugin: continue-on-error: false @@ -357,17 +411,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-example-carbon-accounting-frontend: continue-on-error: false @@ -385,17 +437,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-example-supply-chain-backend: continue-on-error: false @@ -413,17 +463,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-example-supply-chain-business-logic-plugin: continue-on-error: false @@ -440,17 +488,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-example-supply-chain-frontend: continue-on-error: false @@ -468,17 +514,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-consortium-manual: continue-on-error: false @@ -495,17 +539,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-htlc-coordinator-besu: continue-on-error: false @@ -524,17 +566,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-htlc-eth-besu: continue-on-error: false @@ -551,17 +591,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-htlc-eth-besu-erc20: continue-on-error: false @@ -578,17 +616,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-aws-sm: continue-on-error: false @@ -606,17 +642,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-azure-kv: continue-on-error: false @@ -634,17 +668,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-google-sm: continue-on-error: false @@ -662,17 +694,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-memory: continue-on-error: false @@ -689,17 +719,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-memory-wasm: continue-on-error: false @@ -717,17 +745,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-vault: continue-on-error: false @@ -745,17 +771,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-besu: continue-on-error: false @@ -774,17 +798,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-corda: continue-on-error: false @@ -803,17 +825,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-fabric: continue-on-error: false @@ -832,17 +852,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-fabric-socketio: continue-on-error: false @@ -859,17 +877,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: yarn --version - run: yarn install - run: ./tools/ci.sh @@ -889,17 +905,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-iroha: continue-on-error: false @@ -918,17 +932,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-iroha2: continue-on-error: false @@ -945,17 +957,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-quorum: continue-on-error: false @@ -974,17 +984,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-sawtooth-socketio: continue-on-error: false @@ -1002,17 +1010,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-ledger-connector-xdai: continue-on-error: false @@ -1031,17 +1037,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-persistence-ethereum: continue-on-error: false @@ -1058,17 +1062,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-object-store-ipfs: continue-on-error: false @@ -1086,17 +1088,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh # cactus-plugin-odap-hermes: # continue-on-error: false @@ -1118,10 +1118,10 @@ jobs: # run: echo "::set-output name=dir::$(yarn cache dir)" # - id: yarn-cache # name: Restore Yarn Cache - # uses: actions/cache@v3.0.4 + # uses: actions/cache@v3.3.1 # with: # key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - # path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + # path: ./.yarn/ # restore-keys: | # ${{ runner.os }}-yarn- # - run: ./tools/ci.sh @@ -1141,17 +1141,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh env: UBIQUITY_AUTH_TOKEN: ${{ secrets.UBIQUITY_AUTH_TOKEN }} @@ -1170,17 +1168,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-cmd-api-server: continue-on-error: false @@ -1198,17 +1194,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-plugin-consortium-manual: continue-on-error: false @@ -1226,17 +1220,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-plugin-htlc-eth-besu: continue-on-error: false @@ -1254,17 +1246,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh - name: Install Foundry @@ -1290,17 +1280,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-plugin-ledger-connector-besu: continue-on-error: false @@ -1319,17 +1307,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-plugin-ledger-connector-quorum: continue-on-error: false @@ -1346,17 +1332,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-tooling: continue-on-error: false @@ -1375,17 +1359,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-verifier-client: continue-on-error: false @@ -1402,17 +1384,15 @@ jobs: with: node-version: v16.14.2 - uses: actions/checkout@v3.5.2 - - id: yarn-cache-dir-path - name: Get yarn cache directory path - run: echo "::set-output name=dir::$(yarn cache dir)" + - id: yarn-cache name: Restore Yarn Cache - uses: actions/cache@v3.0.4 + uses: actions/cache@v3.3.1 with: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + path: ./.yarn/ restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh ghcr-besu-all-in-one: runs-on: ubuntu-20.04 diff --git a/package.json b/package.json index 9c4d68abd07..3a7bb1542f7 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "reset:git": "git clean -f -X", "reset:yarn-lock": "yarn run init-registries && yarn install --update-checksums --force", "reset": "run-s reset:git reset:node-modules reset:yarn-lock configure", - "configure": "npm run init-registries && yarn install --mode=skip-build && yarn build:dev:backend", + "configure": "npm run init-registries && yarn install && yarn build:dev:backend", "install-yarn": "npm install --global yarn@3.6.0", "set-yarn-version": "yarn set version stable", "enable-corepack": "npm i -g corepack && corepack enable && corepack prepare yarn@3.6.0 --activate", @@ -264,36 +264,5 @@ "web3-shh": { "built": false } - }, - "peerDependenciesMeta": { - "@apollo/protobufjs": {}, - "@nestjs/core": {}, - "@openapitools/openapi-generator-cli": {}, - "@trufflesuite/bigint-buffer": {}, - "aws-sdk": {}, - "bufferutil": {}, - "cbor": {}, - "classic-level": {}, - "core-js": {}, - "cpu-features": {}, - "deasync": {}, - "electron": {}, - "es5-ext": {}, - "esbuild": {}, - "iso-constants": {}, - "keccak": {}, - "keytar": {}, - "leveldown": {}, - "nice-napi": {}, - "pkcs11js": {}, - "protobufjs": {}, - "secp256k1": {}, - "sqlite3": {}, - "ssh2": {}, - "truffle": {}, - "utf-8-validate": {}, - "web3": {}, - "web3-bzz": {}, - "web3-shh": {} } } diff --git a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts index 2325795d3a5..edc526d55db 100644 --- a/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts +++ b/packages/cactus-cmd-api-server/src/test/typescript/unit/plugins/install-basic-plugin-ledger-connector-quorum-0-7-0.test.ts @@ -22,7 +22,13 @@ import { DefaultApi as ApiServerApi } from "../../../../main/typescript/public-a const logLevel: LogLevelDesc = "TRACE"; -test("can import plugins at runtime (CLI)", async (t: Test) => { +/** + * Skipping this test because we are switching to not hoisting dependencies + * and this made it so that the installation no longer works due to the latest + * quorum connector version up on npm (v1.1.3) being broken because it does not declare + * it's dependencies correctly (missing some of them). + */ +test.skip("can import plugins at runtime (CLI)", async (t: Test) => { // const pluginsPath = path.join( // "/tmp/org/hyperledger/cactus/cmd-api-server/runtime-plugin-imports_test", // the dir path from the root // uuidv4(), // then a random directory to ensure proper isolation diff --git a/packages/cactus-plugin-htlc-eth-besu/foundry.toml b/packages/cactus-plugin-htlc-eth-besu/foundry.toml index 3a402ba52a6..a5e295f7edf 100644 --- a/packages/cactus-plugin-htlc-eth-besu/foundry.toml +++ b/packages/cactus-plugin-htlc-eth-besu/foundry.toml @@ -25,10 +25,10 @@ block_coinbase = '0x0000000000000000000000000000000000000000' # the address of ` block_timestamp = 0 # the value of `block.timestamp` in tests block_difficulty = 0 fuzz = { runs = 256 } # the number of fuzz runs for tests -libs = ["../../node_modules"] +libs = ["./node_modules"] remappings = [ - "ds-test/=../../node_modules/ds-test/src/", - "forge-std/=../../node_modules/forge-std/src/", + "ds-test/=./node_modules/ds-test/src/", + "forge-std/=./node_modules/forge-std/src/", ] # Fuzzing CI diff --git a/packages/cactus-plugin-ledger-connector-corda/package.json b/packages/cactus-plugin-ledger-connector-corda/package.json index 96da4cc2fc2..3170feb955e 100644 --- a/packages/cactus-plugin-ledger-connector-corda/package.json +++ b/packages/cactus-plugin-ledger-connector-corda/package.json @@ -74,7 +74,8 @@ "@types/express": "4.17.13", "@types/multer": "1.4.7", "@types/node-ssh": "7.0.1", - "@types/temp": "0.9.1" + "@types/temp": "0.9.1", + "express": "4.17.3" }, "engines": { "node": ">=10", diff --git a/packages/cactus-plugin-ledger-connector-fabric/package.json b/packages/cactus-plugin-ledger-connector-fabric/package.json index 54030fbf48e..402f27c5d8b 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/package.json +++ b/packages/cactus-plugin-ledger-connector-fabric/package.json @@ -100,7 +100,7 @@ "@types/temp": "0.9.1", "@types/uuid": "8.3.1", "fs-extra": "10.0.0", - "internal-ip": "7.0.0", + "internal-ip": "6.2.0", "socket.io": "4.4.1", "ws-wallet": "1.1.5" }, diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts index 828cf1bf3c9..1d55535a9c4 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-identities.test.ts @@ -22,7 +22,7 @@ import { FabricTestLedgerV1, pruneDockerAllIfGithubAction, } from "@hyperledger/cactus-test-tooling"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import axios from "axios"; // test scenario diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts index 55297ecf4af..661fe592ff5 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/run-transaction-with-ws-ids.test.ts @@ -22,7 +22,7 @@ import { WsTestServer, WS_IDENTITY_HTTP_PORT, } from "@hyperledger/cactus-test-tooling"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import { WsWallet } from "ws-wallet"; import { WsIdentityClient } from "ws-identity-client"; diff --git a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts index d497cebb329..c51f0d9c0f2 100644 --- a/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts +++ b/packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/identity-client.test.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import { Containers, VaultTestServer, diff --git a/packages/cactus-plugin-ledger-connector-iroha/package.json b/packages/cactus-plugin-ledger-connector-iroha/package.json index d45ab7411aa..c8cc4ec0345 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/package.json +++ b/packages/cactus-plugin-ledger-connector-iroha/package.json @@ -78,7 +78,7 @@ "@hyperledger/cactus-test-tooling": "2.0.0-alpha.1", "@types/express": "4.17.8", "@types/sanitize-html": "2.6.2", - "internal-ip": "7.0.0", + "internal-ip": "6.2.0", "socket.io": "4.4.1" }, "engines": { diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts index 2015eff5126..8da4c6bc469 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/generate-and-send-signed-transaction.test.ts @@ -40,7 +40,7 @@ import express from "express"; import bodyParser from "body-parser"; import { AddressInfo } from "net"; import { v4 as uuidv4 } from "uuid"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import "jest-extended"; import cryptoHelper from "iroha-helpers/lib/cryptoHelper"; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts index 76150fc41ed..7d7efb190b3 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-iroha-transfer-example.test.ts @@ -2,7 +2,7 @@ import http from "http"; import { AddressInfo } from "net"; import test, { Test } from "tape-promise/tape"; import { v4 as uuidv4 } from "uuid"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import bodyParser from "body-parser"; import express from "express"; import { diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts index 083fbc6e836..e6353c322c2 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/iroha-socketio-endpoint.test.ts @@ -18,7 +18,7 @@ import { pruneDockerAllIfGithubAction, } from "@hyperledger/cactus-test-tooling"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import { v4 as uuidv4 } from "uuid"; import { RuntimeError } from "run-time-error"; import cryptoHelper from "iroha-helpers/lib/cryptoHelper"; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts index 39e4c527a40..e92faf6fc18 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/openapi/openapi-validation.test.ts @@ -2,7 +2,7 @@ import http from "http"; import { AddressInfo } from "net"; import test, { Test } from "tape-promise/tape"; import { v4 as uuidv4 } from "uuid"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import bodyParser from "body-parser"; import express from "express"; import { Server as SocketIoServer } from "socket.io"; diff --git a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts index 10bbe62cd72..682224e4cea 100644 --- a/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts +++ b/packages/cactus-plugin-ledger-connector-iroha/src/test/typescript/integration/run-transaction-endpoint-v1.test.ts @@ -2,7 +2,7 @@ import http from "http"; import { AddressInfo } from "net"; import test, { Test } from "tape-promise/tape"; import { v4 as uuidv4 } from "uuid"; -import { internalIpV4 } from "internal-ip"; +import { v4 as internalIpV4 } from "internal-ip"; import bodyParser from "body-parser"; import express from "express"; import { Server as SocketIoServer } from "socket.io"; diff --git a/packages/cactus-plugin-ledger-connector-iroha2/package.json b/packages/cactus-plugin-ledger-connector-iroha2/package.json index d5ef45c88e5..b2905c9ab80 100644 --- a/packages/cactus-plugin-ledger-connector-iroha2/package.json +++ b/packages/cactus-plugin-ledger-connector-iroha2/package.json @@ -66,6 +66,7 @@ "@types/express": "4.17.8", "@types/sanitize-html": "2.6.2", "body-parser": "1.19.0", + "express": "4.17.3", "jest": "28.1.0", "jest-extended": "2.0.0", "socket.io": "4.4.1", diff --git a/tools/ci.sh b/tools/ci.sh index edc71b974e7..8971d1998ac 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -52,12 +52,34 @@ function checkOnlyDocumentation() ENDED_AT=`date +%s` runtime=$((ENDED_AT-STARTED_AT)) echo "$(date +%FT%T%z) [CI] SUCCESS - runtime=$runtime seconds." - checkWorkTreeStatus exit 0 fi done } +function freeUpGitHubRunnerDiskSpace() { + # If we are running in a GitHub Actions runner, then free up 30 GB space by + # removing things we do not need such as the Android SDK and .NET. + # + # Huge thanks to Maxim Lobanov for the advice: + # https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150 + # + # Why do this? Because we've been getting warnings about the runners being + # left with less than a hundred megabytes of disk space during the tests. + # + # This operation takes about 2 minutes to do and so is disabled by default to get better + # performance from the CI by default. It can be enabled on a per job basis via + # the env variables defined in the action's .yaml files. + # + if [ "${FREE_UP_GITHUB_RUNNER_DISK_SPACE_DISABLED:-true}" = "true" ]; then + echo "$(date +%FT%T%z) [CI] Freeing up GitHub Action Runner disk space disabled. Skipping..." + else + echo "$(date +%FT%T%z) [CI] Freeing up GitHub Action Runner disk space by deleting Android and .NET ..." + sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android + sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET + fi +} + function mainTask() { set -euxo pipefail @@ -83,46 +105,31 @@ function mainTask() # Check if the modified files are only for documentation. checkOnlyDocumentation - # If we are running in a GitHub Actions runner, then free up 30 GB space by - # removing things we do not need such as the Android SDK and .NET. - # - # Huge thanks to Maxim Lobanov for the advice: - # https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150 - # - # Why do this? Because we've been getting warnings about the runners being - # left with less than a hundred megabytes of disk space during the tests. - if [ "${GITHUB_ACTIONS:-false}" = "true" ]; then - echo 'Detected GitHub Action Runner deleting Android and .NET ...' - sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android - sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET - fi + # Can be turned ON/OFF via env var FREE_UP_GITHUB_RUNNER_DISK_SPACE_DISABLED=true/false + freeUpGitHubRunnerDiskSpace - dumpDiskUsageInfo + if [ "${DUMP_DISK_USAGE_INFO_DISABLED:-true}" = "true" ]; then + echo "$(date +%FT%T%z) [CI] dumpDiskUsageInfo disabled. Skipping..." + else + dumpDiskUsageInfo + fi docker --version docker-compose --version node --version npm --version java -version - - # install npm 7 globally - needed because Node v12, v14 default to npm v6 - npm install -g npm@7.19.1 - npm --version yarn --version + export NODE_OPTIONS=--max_old_space_size=5120 + ### COMMON cd $PROJECT_ROOT_DIR - npm run configure - - # Obtains the major NodeJS version such as "12" from "v12.14.1" - # We only run the custom checks above v12 because the globby dependency's - # latest version is forcing us to use Ecmascript Modules which do not work - # on NodeJS 12 even with the additional flags passed in. - nodejs_version=`node --version | awk -v range=1 '{print substr($0,range+1,2)}'` - if [ "$nodejs_version" -gt "12" ]; then - echo "$(date +%FT%T%z) [CI] NodeJS is newer than v12, running custom checks..." - yarn run custom-checks + if [ "${CONFIGURE_DISABLED:-false}" = "true" ]; then + echo "$(date +%FT%T%z) [CI] npm run configure disabled. Skipping..." + else + npm run configure fi if [ "${TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED:-false}" = "true" ]; then @@ -143,7 +150,11 @@ function mainTask() yarn test:jest:all $JEST_TEST_PATTERN fi - dumpDiskUsageInfo + if [ "${DUMP_DISK_USAGE_INFO_DISABLED:-true}" = "true" ]; then + echo "$(date +%FT%T%z) [CI] dumpDiskUsageInfo disabled. Skipping..." + else + dumpDiskUsageInfo + fi if [ "${TAPE_TEST_RUNNER_DISABLED:-false}" = "true" ]; then echo "$(date +%FT%T%z) [CI] Tape test runner disabled. Skipping..." @@ -151,10 +162,11 @@ function mainTask() yarn test:tap:all --bail $TAPE_TEST_PATTERN fi - dumpDiskUsageInfo - - # The webpack production build needs more memory than the default allocation - export NODE_OPTIONS=--max_old_space_size=4096 + if [ "${DUMP_DISK_USAGE_INFO_DISABLED:-true}" = "true" ]; then + echo "$(date +%FT%T%z) [CI] dumpDiskUsageInfo disabled. Skipping..." + else + dumpDiskUsageInfo + fi # We run the full build last because the tests don't need it so in the interest # of providing feedback about failing tests as early as possible we run the @@ -166,10 +178,15 @@ function mainTask() yarn run build fi + if [ "${CHECK_WORK_TREE_STATUS_DISABLED:-true}" = "true" ]; then + echo "$(date +%FT%T%z) [CI] checkWorkTreeStatus disabled. Skipping..." + else + checkWorkTreeStatus + fi + ENDED_AT=`date +%s` runtime=$((ENDED_AT-STARTED_AT)) echo "$(date +%FT%T%z) [CI] SUCCESS - runtime=$runtime seconds." - checkWorkTreeStatus exit 0 } diff --git a/yarn.lock b/yarn.lock index f4fa2563791..82f9aad9de0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5150,6 +5150,7 @@ __metadata: "@types/node-ssh": 7.0.1 "@types/temp": 0.9.1 axios: 0.21.4 + express: 4.17.3 express-openapi-validator: 3.10.0 internal-ip: 6.2.0 joi: 17.9.1 @@ -5229,7 +5230,7 @@ __metadata: form-data: 4.0.0 fs-extra: 10.0.0 http-status-codes: 2.1.4 - internal-ip: 7.0.0 + internal-ip: 6.2.0 jsrsasign: 10.5.25 multer: 1.4.5-lts.1 ngo: 2.7.0 @@ -5295,6 +5296,7 @@ __metadata: "@types/express": 4.17.8 "@types/sanitize-html": 2.6.2 body-parser: 1.19.0 + express: 4.17.3 fast-safe-stringify: 2.1.1 hada: 0.0.8 jest: 28.1.0 @@ -5324,7 +5326,7 @@ __metadata: express: 4.17.1 fast-safe-stringify: 2.1.1 grpc: 1.24.11 - internal-ip: 7.0.0 + internal-ip: 6.2.0 iroha-helpers: 1.5.0 key-encoder: 2.0.3 openapi-types: 7.0.1 @@ -23111,18 +23113,6 @@ __metadata: languageName: node linkType: hard -"internal-ip@npm:7.0.0": - version: 7.0.0 - resolution: "internal-ip@npm:7.0.0" - dependencies: - default-gateway: ^6.0.3 - ipaddr.js: ^2.0.1 - is-ip: ^3.1.0 - p-event: ^4.2.0 - checksum: 058fafe81a7e4d2466474361b74fd712d986f553def881c7dff51fd7eb98573d03c44cab047dddf41473252406e66fa20ed23f6a1b76962b090eee26a22854b6 - languageName: node - linkType: hard - "internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.5": version: 1.0.5 resolution: "internal-slot@npm:1.0.5"