Files
phaseflow/.gitea/workflows/ci.yml
Petru Paler cd103ac1cc
Some checks failed
CI / quality (push) Failing after 2m47s
Deploy / deploy (push) Successful in 1m41s
Add CI pipeline with lint, typecheck, and unit tests
Creates Gitea Actions workflow that runs on pull requests and pushes
to main. Enforces quality gates (lint, typecheck, unit tests) in CI,
complementing the local Lefthook pre-commit hooks.

Features:
- Node.js 24 with pnpm 10 setup
- pnpm dependency caching for faster runs
- Linting with biome
- TypeScript type checking
- 950 unit tests via vitest

Completes P5.3 from the implementation plan.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 22:36:17 +00:00

59 lines
1.4 KiB
YAML

# ABOUTME: Gitea Actions workflow for CI quality gates on pull requests.
# ABOUTME: Runs lint, typecheck, and unit tests before merge is allowed.
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- 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 linter
run: pnpm lint
- name: Run typecheck
run: pnpm tsc --noEmit
- name: Run unit tests
run: pnpm test:run
env:
# Required env vars for tests (dummy values for CI)
NEXT_PUBLIC_POCKETBASE_URL: http://localhost:8090
RESEND_API_KEY: re_test_key
ENCRYPTION_KEY: 12345678901234567890123456789012
CRON_SECRET: test_cron_secret