Skip to content

ci: fix gh workflow and use cache #2

ci: fix gh workflow and use cache

ci: fix gh workflow and use cache #2

Workflow file for this run

name: Run Example Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test-example:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install root dependencies (optional if needed)
run: pnpm install
- name: Install example dependencies
working-directory: ./example
run: pnpm install
- name: Run example tests
working-directory: ./example
run: pnpm test