From 2ae35b0105e366a6756f076ab0fe5e841d3b12fc Mon Sep 17 00:00:00 2001 From: starbirdtech383 Date: Fri, 20 Oct 2023 16:45:23 +0530 Subject: [PATCH] remove use-node-version from .npmrc during build. the node version is already configured as separate action in job removed previous workaround for pnpm and updated node version consistently across jobs --- .github/workflows/ci-cd.yml | 8 ++++-- .../workflows/playwright-test-workflow.yml | 18 +++---------- .../workflows/pre-build-for-playwright.yml | 26 ++++--------------- .github/workflows/release-executables.yml | 1 + .github/workflows/unit-test.yml | 2 ++ .github/workflows/update-sdk-path.yml | 4 +-- 6 files changed, 20 insertions(+), 39 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 388cb7c8a6..18bc1102ed 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -36,7 +36,7 @@ jobs: - name: Setup pnpm uses: pnpm/action-setup@v2 with: - version: 8 + version: 8.8.0 - name: Setup Node uses: actions/setup-node@v3 with: @@ -45,6 +45,8 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + - name: remove use-node-version from .npmrc + run: sed -i '/^use-node-version/d' .npmrc - name: Get pnpm store directory shell: bash run: | @@ -73,11 +75,13 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 18.14.0 + node-version: 18.17.1 - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 + - name: remove use-node-version from .npmrc + run: sed -i '/^use-node-version/d' .npmrc - name: Get pnpm store directory shell: bash run: | diff --git a/.github/workflows/playwright-test-workflow.yml b/.github/workflows/playwright-test-workflow.yml index f753fec7f8..1c52f5ab4f 100644 --- a/.github/workflows/playwright-test-workflow.yml +++ b/.github/workflows/playwright-test-workflow.yml @@ -18,31 +18,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Check node,pnpm Installation and set Path - shell: bash - working-directory: scripts/self-hosted-gh-runner - timeout-minutes: 1 - run: | - ./node-pnpm-check.sh - echo "make sure below mentioned versions are expected versions" - echo "If you are expecting the node and pnpm versions to be updated. Please update the node-pnpm-check.sh script" - env + - name: remove use-node-version from .npmrc + run: sed -i '/^use-node-version/d' .npmrc - name: Setup Node - if: ${{ env.SETUP_NODE != 'false' }} uses: actions/setup-node@v3 with: - node-version: ${{ env.NC_REQ_NODE_V }} + node-version: 18.17.1 - name: Setup pnpm - if: ${{ env.SETUP_PNPM != 'false' }} uses: pnpm/action-setup@v2 with: - version: ${{ env.NC_REQ_PNPM_V }} + version: 8.8.0 - name: Get pnpm store directory shell: bash run: | echo "STORE_PATH=/root/setup-pnpm/node_modules/.bin/store/v3" >> $GITHUB_ENV - uses: actions/cache@v3 - if: env.IS_NPM_CACHE_DOWNLOAD_REQUIRED == 'true' name: Setup pnpm cache with: path: ${{ env.STORE_PATH }} diff --git a/.github/workflows/pre-build-for-playwright.yml b/.github/workflows/pre-build-for-playwright.yml index 079137dfff..33cae79811 100644 --- a/.github/workflows/pre-build-for-playwright.yml +++ b/.github/workflows/pre-build-for-playwright.yml @@ -2,13 +2,7 @@ name: pre-build-for-playwright on: workflow_call: - inputs: - FORCE_RUN_PRERQUISITE_STEPS: - description: 'FORCE_RUN_PRERQUISITE_STEPS' - required: false - type: string - default: 'false' - + jobs: playwright: runs-on: [self-hosted, v3] @@ -16,31 +10,21 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Check node,pnpm Installation and set Path - shell: bash - working-directory: scripts/self-hosted-gh-runner - timeout-minutes: 1 - run: | - ./node-pnpm-check.sh - echo "make sure below mentioned versions are expected versions" - echo "If you are expecting the node and pnpm versions to be updated. Please update the node-pnpm-check.sh script" - env - name: Setup Node - if: ${{ env.SETUP_NODE != 'false' }} uses: actions/setup-node@v3 with: - node-version: ${{ env.NC_REQ_NODE_V }} + node-version: 18.17.1 - name: Setup pnpm - if: ${{ env.SETUP_PNPM != 'false' }} uses: pnpm/action-setup@v2 with: - version: ${{ env.NC_REQ_PNPM_V }} + version: 8.8.0 + - name: remove use-node-version from .npmrc + run: sed -i '/^use-node-version/d' .npmrc - name: Get pnpm store directory shell: bash run: | echo "STORE_PATH=/root/setup-pnpm/node_modules/.bin/store/v3" >> $GITHUB_ENV - uses: actions/cache@v3 - if: env.IS_NPM_CACHE_DOWNLOAD_REQUIRED == 'true' name: Setup pnpm cache with: path: ${{ env.STORE_PATH }} diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index e98c0eb2b9..7b85111c5b 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -25,6 +25,7 @@ jobs: - name: Get pnpm store directory shell: bash run: | + sed -i '/^use-node-version/d' .npmrc echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - uses: actions/cache@v3 name: Setup pnpm cache diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 369ad4c629..00498b7928 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -34,6 +34,8 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'pnpm' + - name: remove use-node-version from .npmrc + run: sed -i '/^use-node-version/d' .npmrc - name: install dependencies run: pnpm bootstrap - name: run unit tests diff --git a/.github/workflows/update-sdk-path.yml b/.github/workflows/update-sdk-path.yml index 4ac8edb0a1..44d0519a6f 100644 --- a/.github/workflows/update-sdk-path.yml +++ b/.github/workflows/update-sdk-path.yml @@ -20,9 +20,9 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - fetch-depth: 0 - + fetch-depth: 0 - run: | + sed -i '/^use-node-version/d' .npmrc pnpm bootstrap - name: Create Pull Request