From 3868a3fd6174ab889b50caa14ae9ade2242f77bf Mon Sep 17 00:00:00 2001 From: Tomasz Awramski Date: Wed, 14 Jun 2023 20:11:26 +0200 Subject: [PATCH] ci(custom-checks): fix sibling pkg dependency version inconsistencies I also snuck in a couple of additional changes in the interest of speeding up CI execution as soon as possible. Apologies for the intrusion! - Peter Somogyvari The additional changes are: 1. Comment out (e.g. disable) the odap-hermes plugin's tests for now since they are completely broken anyway and just wasting CI resources. 2. Fixed a logging bug in the custom-checks .ts script 3. Modified the ci.sh file (the workhorse of the CI) so that it does run the custom-checks as part of it. This was made possible by the change that this commit is originally intended to do (e.g., without this change the custom checks would fail but now they pass) Closes: #2431 Co-authored-by: Peter Somogyvari Signed-off-by: Peter Somogyvari Signed-off-by: Tomasz Awramski --- .github/workflows/ci.yaml | 54 +++++++++---------- .../cactus-dummy-package/package.json | 2 +- .../cactus-plugin-htlc-eth-besu/package.json | 4 +- .../package.json | 2 +- .../package.json | 8 +-- tools/ci.sh | 1 + tools/custom-checks/run-custom-checks.ts | 2 +- 7 files changed, 37 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d66c5afec9..bbfc947ead 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -988,33 +988,33 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - run: ./tools/ci.sh - cactus-plugin-odap-hermes: - continue-on-error: false - env: - FULL_BUILD_DISABLED: true - JEST_TEST_PATTERN: packages/cactus-plugin-odap-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts - JEST_TEST_RUNNER_DISABLED: false - TAPE_TEST_RUNNER_DISABLED: true - needs: build-dev - runs-on: ubuntu-20.04 - steps: - - name: Use Node.js v16.14.2 - uses: actions/setup-node@v3.6.0 - 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 - with: - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - restore-keys: | - ${{ runner.os }}-yarn- - - run: ./tools/ci.sh + # cactus-plugin-odap-hermes: + # continue-on-error: false + # env: + # FULL_BUILD_DISABLED: true + # JEST_TEST_PATTERN: packages/cactus-plugin-odap-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts + # JEST_TEST_RUNNER_DISABLED: false + # TAPE_TEST_RUNNER_DISABLED: true + # needs: build-dev + # runs-on: ubuntu-20.04 + # steps: + # - name: Use Node.js v16.14.2 + # uses: actions/setup-node@v3.6.0 + # 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 + # with: + # key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + # path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + # restore-keys: | + # ${{ runner.os }}-yarn- + # - run: ./tools/ci.sh cactus-plugin-connector-ubiquity: continue-on-error: false env: diff --git a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json index 6dfe62f36f..24e2e2f91c 100644 --- a/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json +++ b/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json @@ -1,6 +1,6 @@ { "name": "@hyperledger/cactus-dummy-package", - "version": "1.0.0", + "version": "2.0.0-alpha.1", "description": "Dummy package for testing.", "main": "index.js" } \ No newline at end of file diff --git a/packages/cactus-plugin-htlc-eth-besu/package.json b/packages/cactus-plugin-htlc-eth-besu/package.json index be50467f36..79a592ec3f 100644 --- a/packages/cactus-plugin-htlc-eth-besu/package.json +++ b/packages/cactus-plugin-htlc-eth-besu/package.json @@ -74,8 +74,8 @@ "web3js-quorum": "21.7.0-rc1" }, "devDependencies": { - "@hyperledger/cactus-plugin-keychain-memory": "1.2.0", - "@hyperledger/cactus-test-tooling": "1.2.0", + "@hyperledger/cactus-plugin-keychain-memory": "2.0.0-alpha.1", + "@hyperledger/cactus-test-tooling": "2.0.0-alpha.1", "@types/express": "4.17.13" }, "engines": { diff --git a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json index 5a896db634..badc91d6f5 100644 --- a/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json +++ b/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@hyperledger/cactus-api-client": "2.0.0-alpha.1", - "@hyperledger/cactus-common": "1.2.0", + "@hyperledger/cactus-common": "2.0.0-alpha.1", "@hyperledger/cactus-test-tooling": "2.0.0-alpha.1", "@types/config": "0.0.41" } diff --git a/packages/cactus-plugin-ledger-connector-ubiquity/package.json b/packages/cactus-plugin-ledger-connector-ubiquity/package.json index e2d8c82842..49d53cb530 100644 --- a/packages/cactus-plugin-ledger-connector-ubiquity/package.json +++ b/packages/cactus-plugin-ledger-connector-ubiquity/package.json @@ -55,15 +55,15 @@ "tsc": "tsc --project ./tsconfig.json" }, "dependencies": { - "@hyperledger/cactus-core": "1.1.2", - "@hyperledger/cactus-core-api": "1.1.2", + "@hyperledger/cactus-core": "2.0.0-alpha.1", + "@hyperledger/cactus-core-api": "2.0.0-alpha.1", "@ubiquity/ubiquity-ts-client-modified": "https://github.com/RafaelAPB/ubiquity-ts-client-mirror.git", "dotenv": "16.0.1", "typescript-optional": "2.0.1" }, "devDependencies": { - "@hyperledger/cactus-common": "1.1.2", - "@hyperledger/cactus-test-tooling": "1.1.2", + "@hyperledger/cactus-common": "2.0.0-alpha.1", + "@hyperledger/cactus-test-tooling": "2.0.0-alpha.1", "@types/express": "4.17.8" }, "engines": { diff --git a/tools/ci.sh b/tools/ci.sh index 67fe09598e..790ee3ffd5 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -120,6 +120,7 @@ function mainTask() fi yarn tools:validate-bundle-names + yarn custom-checks if [ "${JEST_TEST_RUNNER_DISABLED:-false}" = "true" ]; then echo "$(date +%FT%T%z) [CI] Jest test runner disabled. Skipping..." diff --git a/tools/custom-checks/run-custom-checks.ts b/tools/custom-checks/run-custom-checks.ts index eee5013643..de5148bc99 100644 --- a/tools/custom-checks/run-custom-checks.ts +++ b/tools/custom-checks/run-custom-checks.ts @@ -12,7 +12,7 @@ export async function runCustomChecks( let overallSuccess = true; let overallErrors: string[] = []; - console.log("${TAG} Current NodeJS version is v", version); + console.log(`${TAG} Current NodeJS version is v${version}`); { const [success, errors] = await checkOpenApiJsonSpecs({ argv, env });