Skip to content

chore: update GitHub Actions validation workflow for Node.js and pnpm… #4

chore: update GitHub Actions validation workflow for Node.js and pnpm…

chore: update GitHub Actions validation workflow for Node.js and pnpm… #4

Workflow file for this run

name: Code Validation
on:
push:
pull_request:
branches:
- main
- publish
paths:
- 'components/**'
jobs:
validation:
runs-on: ubuntu-latest
name: Validate Code Base
defaults:
run:
working-directory: ./components
steps:
- uses: actions/[email protected]
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 20
- name : Install pnpm
uses: pnpm/[email protected]
with:
version: 9.6.0
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/[email protected]
name: Setup pnpm cache
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
run: pnpm install --no-frozen-lockfile
- name: Run Lint
run: pnpm lint
- name: Run Build
run: pnpm build