e5d45e121b
pnpm/action-setup@v4 fails in Gitea Actions runners. Use corepack (built into Node.js) to activate pnpm@9.15.0 matching the packageManager field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
62 lines
1.2 KiB
YAML
62 lines
1.2 KiB
YAML
name: Tessera CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
quality:
|
|
name: Lint & Type Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Enable pnpm via corepack
|
|
run: corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: pnpm lint
|
|
|
|
- name: Type check
|
|
run: pnpm type-check
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
needs: quality
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Enable pnpm via corepack
|
|
run: corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run tests
|
|
run: pnpm test
|
|
|
|
build-deploy:
|
|
name: Build & Deploy
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build Docker images
|
|
run: docker compose build web api
|
|
|
|
- name: Deploy services
|
|
run: docker compose up -d web api
|