Update GitHub Workflow to use pnpm action

This commit updates the workflow configuration to use the 'pnpm/action-setup' GitHub Action. This eliminates the need for a separate step to globally install pnpm, simplifying the dependency installation process. Both the setup and the use of pnpm have been streamlined.
This commit is contained in:
giancarlo
2024-04-11 16:26:04 +08:00
parent e517d18d48
commit 96a1857da1

View File

@@ -12,6 +12,10 @@ jobs:
with: with:
fetch-depth: 2 fetch-depth: 2
- uses: pnpm/action-setup@v2
with:
version: 6.32.9
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: lts/* node-version: lts/*
@@ -25,7 +29,7 @@ jobs:
${{ runner.os }}-turbo- ${{ runner.os }}-turbo-
- name: Install dependencies - name: Install dependencies
run: npm install -g pnpm && pnpm install run: pnpm install
- name: Typecheck - name: Typecheck
run: pnpm run typecheck run: pnpm run typecheck
- name: Lint - name: Lint
@@ -39,6 +43,10 @@ jobs:
with: with:
fetch-depth: 2 fetch-depth: 2
- uses: pnpm/action-setup@v2
with:
version: 6.32.9
- uses: actions/cache@v4 - uses: actions/cache@v4
with: with:
path: .turbo path: .turbo
@@ -52,7 +60,7 @@ jobs:
cache: 'pnpm' cache: 'pnpm'
- name: Install dependencies - name: Install dependencies
run: npm install -g pnpm && pnpm install run: pnpm install
- name: Install Playwright Browsers - name: Install Playwright Browsers
run: pnpm exec ./apps/e2e/node_modules/.bin/playwright install --with-deps run: pnpm exec ./apps/e2e/node_modules/.bin/playwright install --with-deps
- name: Run Playwright tests - name: Run Playwright tests