diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a92c79dda9d..66356dc77e6 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 @@ -27,16 +28,31 @@ 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-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + path: | + .build-cache/ + '**/dist' + '!**/node_modules' + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + + - if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }} + name: tools_ci_sh + run: ./tools/ci.sh + yarn_lint: continue-on-error: false env: @@ -56,13 +72,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: ./tools/ci.sh - run: yarn lint yarn_codegen: continue-on-error: false @@ -73,6 +89,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,18 +98,16 @@ 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 @@ -102,7 +117,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: @@ -113,14 +129,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 - - run: yarn custom-checks + - run: ./tools/ci.sh yarn_tools_validate_bundle_names: continue-on-error: false env: @@ -128,8 +143,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: @@ -140,14 +156,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 +180,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-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + path: | + .build-cache/ + '**/dist' + '!**/node_modules' + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + - run: ./tools/ci.sh cactus-cmd-api-server: continue-on-error: false @@ -192,18 +220,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- - - run: ./tools/ci.sh + ${{ 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-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + path: | + .build-cache/ + '**/dist' + '!**/node_modules' + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + cactus-cmd-socketio-server: continue-on-error: false env: @@ -219,18 +256,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- - - run: ./tools/ci.sh + ${{ 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-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + path: | + .build-cache/ + '**/dist' + '!**/node_modules' + restore-keys: ${{ runner.os }}-pkg-dist-cache-${{ hashFiles('./.build-cache/*.tsbuildinfo') }} + cactus-common: continue-on-error: false env: @@ -248,17 +294,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 }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-core: continue-on-error: false @@ -275,17 +319,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 }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-core-api: continue-on-error: false @@ -302,17 +344,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 }} 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 +370,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 }} 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 +395,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 }} 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 +421,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 }} 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 +447,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 }} 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 +472,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 }} 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 +498,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 }} 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 +523,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 }} 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 +550,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 }} 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 +575,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 }} 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 +600,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 }} 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 +626,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 }} 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 +652,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 }} 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 +678,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 }} 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 +703,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 }} 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 +729,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 }} 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 +755,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 }} 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 +782,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 }} 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 +809,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 }} 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 +836,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 }} 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 +861,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 }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: yarn --version - run: yarn install - run: ./tools/ci.sh @@ -889,17 +889,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 }} 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 +916,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 }} 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 +941,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 }} 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 +968,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 }} 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 +994,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 }} 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 +1021,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 }} 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 +1046,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 }} 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 +1072,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 }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh # cactus-plugin-odap-hermes: # continue-on-error: false @@ -1118,7 +1102,7 @@ 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 }} @@ -1141,17 +1125,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 }} 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 +1152,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 }} 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 +1178,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 }} 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 +1204,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 }} 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 +1230,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 }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh - name: Install Foundry @@ -1290,17 +1264,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 }} 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 +1291,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 }} 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 +1316,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 }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-test-tooling: continue-on-error: false @@ -1375,17 +1343,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 }} restore-keys: | - ${{ runner.os }}-yarn- + ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh cactus-verifier-client: continue-on-error: false @@ -1402,17 +1368,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 }} 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 f8c6bc14c5a..855f9c5a64b 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 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/tools/ci.sh b/tools/ci.sh index edc71b974e7..30590855d34 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,28 @@ 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 + 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 +138,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 +150,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 +166,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 }