chore: update GitHub Actions validation workflow for Node.js and pnpm… #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |