From 35c34cd81efeca6ed3e3499297b4b441e723ed19 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 | 281 ++++++------------ package.json | 2 +- ...ugin-ledger-connector-quorum-0-7-0.test.ts | 8 +- tools/ci.sh | 44 +-- 4 files changed, 130 insertions(+), 205 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a92c79dda9..29e6f27a9f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,6 +20,7 @@ jobs: TAPE_TEST_RUNNER_DISABLED: true TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true CUSTOM_CHECKS_DISABLED: true + CONFIGURE_DISABLED: false runs-on: ubuntu-20.04 steps: - name: Use Node.js v16.14.2 @@ -36,7 +37,6 @@ jobs: path: ./.yarn/ restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - # lint clean codegen yarn_lint: continue-on-error: false env: @@ -62,7 +62,7 @@ jobs: 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 @@ -73,6 +73,7 @@ jobs: TAPE_TEST_RUNNER_DISABLED: false TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true CUSTOM_CHECKS_DISABLED: true + CONFIGURE_DISABLED: true needs: build-dev runs-on: ubuntu-20.04 steps: @@ -81,9 +82,7 @@ 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 @@ -92,7 +91,7 @@ jobs: 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 @@ -102,7 +101,8 @@ jobs: JEST_TEST_RUNNER_DISABLED: false TAPE_TEST_RUNNER_DISABLED: false TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true - CUSTOM_CHECKS_DISABLED: true + CUSTOM_CHECKS_DISABLED: false + CONFIGURE_DISABLED: true needs: build-dev runs-on: ubuntu-20.04 steps: @@ -119,8 +119,7 @@ jobs: 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: @@ -128,8 +127,9 @@ jobs: FULL_BUILD_DISABLED: true JEST_TEST_RUNNER_DISABLED: false TAPE_TEST_RUNNER_DISABLED: false - TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: true + TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED: false CUSTOM_CHECKS_DISABLED: true + CONFIGURE_DISABLED: true needs: build-dev runs-on: ubuntu-20.04 steps: @@ -146,8 +146,7 @@ jobs: 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: @@ -192,9 +191,7 @@ 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 @@ -202,7 +199,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-cmd-socketio-server: continue-on-error: false @@ -219,9 +216,7 @@ 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 @@ -229,7 +224,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-common: continue-on-error: false @@ -248,9 +243,7 @@ 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 @@ -258,7 +251,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-core: continue-on-error: false @@ -275,9 +268,7 @@ 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 @@ -285,7 +276,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-core-api: continue-on-error: false @@ -302,9 +293,7 @@ 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 @@ -312,7 +301,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +319,7 @@ 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 @@ -340,7 +327,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +344,7 @@ 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 @@ -367,7 +352,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +370,7 @@ 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 @@ -395,7 +378,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +396,7 @@ 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 @@ -423,7 +404,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +421,7 @@ 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 @@ -450,7 +429,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +447,7 @@ 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 @@ -478,7 +455,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-consortium-manual: continue-on-error: false @@ -495,9 +472,7 @@ 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 @@ -505,7 +480,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +499,7 @@ 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 @@ -534,7 +507,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +524,7 @@ 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 @@ -561,7 +532,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +549,7 @@ 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 @@ -588,7 +557,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +575,7 @@ 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 @@ -616,7 +583,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +601,7 @@ 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 @@ -644,7 +609,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +627,7 @@ 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 @@ -672,7 +635,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-memory: continue-on-error: false @@ -689,9 +652,7 @@ 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 @@ -699,7 +660,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +678,7 @@ 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 @@ -727,7 +686,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-keychain-vault: continue-on-error: false @@ -745,9 +704,7 @@ 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 @@ -755,7 +712,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +731,7 @@ 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 @@ -784,7 +739,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +758,7 @@ 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 @@ -813,7 +766,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +785,7 @@ 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 @@ -842,7 +793,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +810,7 @@ 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 @@ -869,7 +818,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: yarn --version - run: yarn install - run: ./tools/ci.sh @@ -889,9 +838,7 @@ 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 @@ -899,7 +846,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +865,7 @@ 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 @@ -928,7 +873,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +890,7 @@ 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 @@ -955,7 +898,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +917,7 @@ 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 @@ -984,7 +925,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +943,7 @@ 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 @@ -1012,7 +951,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +970,7 @@ 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 @@ -1041,7 +978,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-plugin-persistence-ethereum: continue-on-error: false @@ -1058,9 +995,7 @@ 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 @@ -1068,7 +1003,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +1021,7 @@ 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 @@ -1096,7 +1029,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh # cactus-plugin-odap-hermes: # continue-on-error: false @@ -1141,9 +1074,7 @@ 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 @@ -1151,7 +1082,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh env: UBIQUITY_AUTH_TOKEN: ${{ secrets.UBIQUITY_AUTH_TOKEN }} @@ -1170,9 +1101,7 @@ 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 @@ -1180,7 +1109,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +1127,7 @@ 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 @@ -1208,7 +1135,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +1153,7 @@ 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 @@ -1236,7 +1161,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +1179,7 @@ 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 @@ -1264,7 +1187,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh - name: Install Foundry @@ -1290,9 +1213,7 @@ 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 @@ -1300,7 +1221,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +1240,7 @@ 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 @@ -1329,7 +1248,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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,9 +1265,7 @@ 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 @@ -1356,7 +1273,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-tooling: continue-on-error: false @@ -1375,9 +1292,7 @@ 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 @@ -1385,7 +1300,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-verifier-client: continue-on-error: false @@ -1402,9 +1317,7 @@ 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 @@ -1412,7 +1325,7 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 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 f8c6bc14c5..855f9c5a64 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", 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 2325795d3a..edc526d55d 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/tools/ci.sh b/tools/ci.sh index edc71b974e..c9cd5792b9 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -52,7 +52,6 @@ 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 @@ -97,32 +96,26 @@ function mainTask() sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET fi - 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 ### 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] yarn configure disabled. Skipping..." + else + yarn configure fi if [ "${TOOLS_VALIDATE_BUNDLE_NAMES_DISABLED:-false}" = "true" ]; then @@ -143,7 +136,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,7 +148,11 @@ function mainTask() yarn test:tap:all --bail $TAPE_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 # The webpack production build needs more memory than the default allocation export NODE_OPTIONS=--max_old_space_size=4096 @@ -166,10 +167,15 @@ function mainTask() yarn run build fi + if [ "${CHECK_WORK_TREE_STATUS_DISABLED:-false}" = "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 }