From 0a8d832718f754e571869405addb1b38295bbe42 Mon Sep 17 00:00:00 2001 From: Saidev Dhal Date: Mon, 25 Nov 2024 09:27:23 +0530 Subject: [PATCH] install pnpm --- .github/workflows/deploy-triggers.yml | 23 +++++---- .github/workflows/format-and-push.yml | 24 +++++----- .github/workflows/lint-and-typecheck.yml | 47 ++++++++++--------- .../workflows/test-multiple-node-versions.yml | 28 +++++------ 4 files changed, 61 insertions(+), 61 deletions(-) diff --git a/.github/workflows/deploy-triggers.yml b/.github/workflows/deploy-triggers.yml index c008911..2dfb22a 100644 --- a/.github/workflows/deploy-triggers.yml +++ b/.github/workflows/deploy-triggers.yml @@ -12,21 +12,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Use Node.js 20.x - uses: actions/setup-node@v4 + - uses: pnpm/action-setup@v4 + name: Install pnpm with: - node-version: "20.x" + version: 9 + run_install: false - - name: Install pnpm - run: npm install -g pnpm - - - name: Set up pnpm environment - run: | - pnpm setup - export PATH=$(pnpm env get-path):$PATH - shell: bash + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '21.7.1' + cache: 'pnpm' - name: Install dependencies run: pnpm install diff --git a/.github/workflows/format-and-push.yml b/.github/workflows/format-and-push.yml index 405f20a..edbb819 100644 --- a/.github/workflows/format-and-push.yml +++ b/.github/workflows/format-and-push.yml @@ -18,22 +18,20 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v2 + - uses: pnpm/action-setup@v4 + name: Install pnpm with: - node-version: '20.x' - - - name: Install pnpm - run: npm install -g pnpm + version: 9 + run_install: false - - name: Set up pnpm environment - run: | - pnpm setup - export PATH=$(pnpm env get-path):$PATH - shell: bash + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '21.7.1' + cache: 'pnpm' - name: Cache pnpm modules uses: actions/cache@v3 diff --git a/.github/workflows/lint-and-typecheck.yml b/.github/workflows/lint-and-typecheck.yml index 3be7fbd..36835ce 100644 --- a/.github/workflows/lint-and-typecheck.yml +++ b/.github/workflows/lint-and-typecheck.yml @@ -14,26 +14,21 @@ jobs: setup: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: false - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: '21.7.1' - - - name: Install pnpm - run: npm install -g pnpm - - - name: Set up pnpm environment - run: | - pnpm setup - export PATH=$(pnpm env get-path):$PATH - shell: bash - - - name: Install turbo - run: pnpm install -g turbo - + cache: 'pnpm' + - name: Cache pnpm modules uses: actions/cache@v3 with: @@ -45,20 +40,30 @@ jobs: - name: Install dependencies run: pnpm install + - name: Install turbo + run: pnpm install -g turbo + lint: runs-on: ubuntu-latest needs: setup steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: false - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: '21.7.1' + cache: 'pnpm' - - name: Use pnpm & turbo from setup - run: pnpm --version && turbo --version + - name: Install dependencies + run: pnpm install - name: Run Lint run: pnpm lint diff --git a/.github/workflows/test-multiple-node-versions.yml b/.github/workflows/test-multiple-node-versions.yml index 584237d..4532e2b 100644 --- a/.github/workflows/test-multiple-node-versions.yml +++ b/.github/workflows/test-multiple-node-versions.yml @@ -18,13 +18,20 @@ jobs: node-version: [20.18.0, 18.20.4, 22.11.0, 19.9.0, 23.1.0] # Ensure all versions are >= v18 steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: false - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + cache: 'pnpm' - name: Set environment variables run: | @@ -42,18 +49,6 @@ jobs: echo "RESEND_API=${{ secrets.RESEND_API }}" >> apps/api/.env cat apps/api/.env # Verify .env contents - - name: Install pnpm - run: npm install -g pnpm - - - name: Set up pnpm environment - run: | - pnpm setup - export PATH=$(pnpm env get-path):$PATH - shell: bash - - - name: Install trubo - run: pnpm install -g turbo - - name: Cache pnpm modules uses: actions/cache@v3 with: @@ -65,5 +60,8 @@ jobs: - name: Install dependencies run: pnpm install + - name: Install trubo + run: pnpm install -g turbo + - name: Run Turbo tests run: turbo test