Skip to content

feat(tooling): Add ci workflow #1

feat(tooling): Add ci workflow

feat(tooling): Add ci workflow #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths:
- "**.ts"
- "**.tsx"
- "*.config.ts"
- "tsconfig.json"
- "package.json"
- "pnpm-lock.yaml"
- ".github/workflows/ci.yml"
pull_request:
branches: [main]
paths:
- "**.ts"
- "**.tsx"
- "*.config.ts"
- "tsconfig.json"
- "package.json"
- "pnpm-lock.yaml"
- ".github/workflows/ci.yml"
jobs:
ci:
strategy:
matrix:
os: [ubuntu-24.04]
node: [18.x, 20.x, 22.x, 23.x]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- name: Setup pnpm
id: pnpm-install
uses: pnpm/action-setup@v3
with:
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
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 i --frozen-lockfile --prefer-offline
- name: Run tests
run: pnpm vitest run