ci: install pnpm using setup action #162
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
push: | |
paths: | |
- ".github/workflows/**" | |
- "src/**" | |
- "tests/**" | |
- "package.json" | |
- "pnpm-lock.yaml" | |
pull_request: | |
paths: | |
- ".github/workflows/**" | |
- "src/**" | |
- "tests/**" | |
- "package.json" | |
- "pnpm-lock.yaml" | |
workflow_dispatch: | |
jobs: | |
default: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: ["lts/*", "*"] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
fetch-depth: 1 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v5 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- 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 dependencies | |
run: pnpm install --frozen-lockfile --strict-peer-dependencies | |
- name: Lint Source | |
run: pnpm exec biome ci | |
- name: Build Source | |
run: pnpm run --if-present build | |
- name: Run Tests | |
run: pnpm run --if-present test |