Skip to content

Add CI routines

Add CI routines #4

Workflow file for this run

name: Lint & Format
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
name: Lint & Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Debug directory content
run: |
echo "Current directory content:"
ls -la
echo "Lockfile content (if exists):"
cat pnpm-lock.yaml || echo "Lockfile not found"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
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
- name: Run ESLint
run: pnpm lint
- name: Check Formatting
run: pnpm format:check
- name: Type Check
run: pnpm typecheck