mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-26 13:58:49 +00:00
feat: Migrate web-dashboard CI workflow from npm to pnpm
- Replace npm cache with pnpm setup and store caching in CI workflow - Add pnpm/action-setup@v4 with version 9 - Configure pnpm store path caching with pnpm-lock.yaml hash key - Update install command to use pnpm install --frozen-lockfile instead of npm ci - Update lint and build commands to use pnpm run instead of npm run
This commit is contained in:
@@ -79,16 +79,33 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
cache: 'npm'
|
|
||||||
cache-dependency-path: apps/web-dashboard/package-lock.json
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
id: pnpm-cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Setup pnpm cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: apps/web-dashboard
|
working-directory: apps/web-dashboard
|
||||||
run: npm ci
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
working-directory: apps/web-dashboard
|
working-directory: apps/web-dashboard
|
||||||
run: npm run lint || true
|
run: pnpm run lint || true
|
||||||
|
|
||||||
- name: Run type check
|
- name: Run type check
|
||||||
working-directory: apps/web-dashboard
|
working-directory: apps/web-dashboard
|
||||||
@@ -96,7 +113,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
working-directory: apps/web-dashboard
|
working-directory: apps/web-dashboard
|
||||||
run: npm run build
|
run: pnpm run build
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
name: Docker Build
|
name: Docker Build
|
||||||
|
|||||||
Reference in New Issue
Block a user