From 806347a6d8e002fd2481992b5e607c717241f6d0 Mon Sep 17 00:00:00 2001 From: Rodrigo Quelhas <22591718+RomarQ@users.noreply.github.com> Date: Wed, 31 Jan 2024 12:05:24 +0000 Subject: [PATCH] Enforce minimum [pnpm, node] versions when running typescript tests (#2632) * Enforce minimum engine versions when running typescript tests * chore(ci): set node-version (20.10.0) explicitly in all github actions --- .github/workflow-templates/dev-tests/action.yml | 2 +- .github/workflows/build.yml | 12 ++++++------ .github/workflows/client-release-issue.yml | 4 ++-- .github/workflows/publish-binary.yml | 4 ++-- .github/workflows/publish-runtime.yml | 4 ++-- .github/workflows/publish-typescript-api.yml | 8 ++++---- .github/workflows/runtime-release-issue.yml | 4 ++-- .github/workflows/upgrade-typescript-api.yml | 4 ++-- .github/workflows/version-bump.yml | 4 ++-- test/.npmrc | 3 ++- test/package.json | 4 ++++ 11 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflow-templates/dev-tests/action.yml b/.github/workflow-templates/dev-tests/action.yml index 6684b0df00..e6e57b8cb7 100644 --- a/.github/workflow-templates/dev-tests/action.yml +++ b/.github/workflow-templates/dev-tests/action.yml @@ -18,7 +18,7 @@ runs: version: 8.6.12 - uses: actions/setup-node@v3 with: - node-version: 20.10 + node-version: 20.10.0 cache: "pnpm" cache-dependency-path: test/pnpm-lock.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09cb0435fa..efd3024a7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -201,10 +201,10 @@ jobs: uses: pnpm/action-setup@v2 with: version: 8.6.12 - - name: Use Node.js 20.10 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 20.10 + node-version: 20.10.0 cache: "pnpm" cache-dependency-path: test/pnpm-lock.yaml - name: Run Eslint check @@ -417,10 +417,10 @@ jobs: uses: pnpm/action-setup@v2 with: version: 8.6.12 - - name: Use Node.js 20.10 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 20.10 + node-version: 20.10.0 cache: "pnpm" cache-dependency-path: test/pnpm-lock.yaml - run: | @@ -543,7 +543,7 @@ jobs: version: 8 - uses: actions/setup-node@v3 with: - node-version: 20.10 + node-version: 20.10.0 cache: "pnpm" cache-dependency-path: test/pnpm-lock.yaml - name: Create local folders @@ -591,7 +591,7 @@ jobs: version: 8 - uses: actions/setup-node@v3 with: - node-version: 20.10 + node-version: 20.10.0 - name: Create local folders run: | mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/ diff --git a/.github/workflows/client-release-issue.yml b/.github/workflows/client-release-issue.yml index ce79c94d47..59a2440517 100644 --- a/.github/workflows/client-release-issue.yml +++ b/.github/workflows/client-release-issue.yml @@ -26,10 +26,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 18.x + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.10.0 - name: Download Original Tools uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/publish-binary.yml b/.github/workflows/publish-binary.yml index bd3e313bfd..03f0152c16 100644 --- a/.github/workflows/publish-binary.yml +++ b/.github/workflows/publish-binary.yml @@ -87,10 +87,10 @@ jobs: with: name: binaries path: build - - name: Use Node.js 18.x + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.10.0 - name: Download Original Tools uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/publish-runtime.yml b/.github/workflows/publish-runtime.yml index 36182ff973..f246da8fb5 100644 --- a/.github/workflows/publish-runtime.yml +++ b/.github/workflows/publish-runtime.yml @@ -135,10 +135,10 @@ jobs: with: name: moonbeam-runtime path: build - - name: Use Node.js 18.x + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.10.0 - name: Download Original Tools uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/publish-typescript-api.yml b/.github/workflows/publish-typescript-api.yml index 56812ffd1b..eb6828fe32 100644 --- a/.github/workflows/publish-typescript-api.yml +++ b/.github/workflows/publish-typescript-api.yml @@ -14,10 +14,10 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.sha }} - - name: Use Node.js 20.10 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 20.10 + node-version: 20.10.0 - name: Build typescript API run: | cd typescript-api @@ -37,10 +37,10 @@ jobs: uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.sha }} - - name: Use Node.js 20.10 + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 20.10 + node-version: 20.10.0 - name: Upgrade polkadotjs for tests run: | cd test diff --git a/.github/workflows/runtime-release-issue.yml b/.github/workflows/runtime-release-issue.yml index 3fbbec0a63..5f9dcf842e 100644 --- a/.github/workflows/runtime-release-issue.yml +++ b/.github/workflows/runtime-release-issue.yml @@ -29,10 +29,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 18.x + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.10.0 - name: Download Original Tools uses: actions/download-artifact@v3 with: diff --git a/.github/workflows/upgrade-typescript-api.yml b/.github/workflows/upgrade-typescript-api.yml index 64bd70a02e..1a530574ac 100644 --- a/.github/workflows/upgrade-typescript-api.yml +++ b/.github/workflows/upgrade-typescript-api.yml @@ -24,10 +24,10 @@ jobs: mkdir -p build docker cp dummy:/moonbeam/moonbeam build/moonbeam docker rm -f dummy - - name: Use Node.js 20.10 + - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: 20.9.0 + node-version: 20.10.0 - name: Use pnpm uses: pnpm/action-setup@v2 with: diff --git a/.github/workflows/version-bump.yml b/.github/workflows/version-bump.yml index 96621b9fae..186d0ce251 100644 --- a/.github/workflows/version-bump.yml +++ b/.github/workflows/version-bump.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Use Node.js 18.x + - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: 20.10.0 - name: Generate version bump issue env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/test/.npmrc b/test/.npmrc index 04d53746c6..2d64344b1a 100644 --- a/test/.npmrc +++ b/test/.npmrc @@ -1,4 +1,5 @@ ignore-workspace-root-check = true strict-peer-dependencies = false registry = https://registry.npmjs.org/ -auto-install-peers = true \ No newline at end of file +auto-install-peers = true +engine-strict=true diff --git a/test/package.json b/test/package.json index 136e701e98..ee92f2845b 100644 --- a/test/package.json +++ b/test/package.json @@ -66,5 +66,9 @@ "prettier": "2.8.8", "typescript": "5.3.3", "yargs": "17.7.2" + }, + "engines": { + "pnpm": ">=8.6", + "node": ">=20.10.0" } }