Skip to content

0.8.0

0.8.0 #39

name: PR Type Checking (Prod - Frontend & Backend)
on:
pull_request:
branches:
- "main"
jobs:
type-check-backend:
name: Backend Type Checking
timeout-minutes: 5
runs-on: ubuntu-latest
env:
DATABASE_CLOUD_URL: ${{ secrets.DATABASE_CLOUD_URL }}
DIRECT_CLOUD_URL: ${{ secrets.DIRECT_CLOUD_URL }}
SUPABASE_CLOUD_URL: ${{ secrets.SUPABASE_CLOUD_URL }}
SUPABASE_CLOUD_ADMIN_KEY: ${{ secrets.SUPABASE_CLOUD_ADMIN_KEY }}
SUPABASE_LOCAL_URL: ${{ secrets.SUPABASE_LOCAL_URL }}
SUPABASE_LOCAL_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_LOCAL_SERVICE_ROLE_KEY }}
DATABASE_LOCAL_URL: ${{ secrets.DATABASE_LOCAL_URL }}
DIRECT_LOCAL_URL: ${{ secrets.DIRECT_LOCAL_URL }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
PAYMONGO_SECRET_KEY: ${{ secrets.PAYMONGO_SECRET_KEY }}
N8N_VECTOR_SEARCH_URL: ${{ secrets.N8N_VECTOR_SEARCH_URL }}
N8N_API_KEY: ${{ secrets.N8N_API_KEY }}
steps:
- name: Checkout Repository Code
uses: actions/checkout@v4
- name: Install pnpm Package Manager
uses: pnpm/action-setup@v4
- name: Set up Node.js Environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Restore pnpm Cache and Node Modules
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
backend/node_modules
key: ${{ runner.os }}-backend-${{ hashFiles('backend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-backend-
- name: Install Backend Dependencies
working-directory: ./backend
run: pnpm install --no-frozen-lockfile
- name: Generate Prisma Types
working-directory: ./backend
run: pnpm prisma-gen
- name: Generate Prisma SQL Types
working-directory: ./backend
run: pnpm prisma-gen-sql
- name: Generate API Specs
working-directory: ./
run: pnpm backend:api
- name: Run TypeScript Type Check
working-directory: ./backend
run: pnpm tsc --noEmit
- name: Upload API Specs
uses: actions/upload-artifact@v4
with:
name: api-specs
path: frontend/src/integrations/api/api-spec.json
retention-days: 1
type-check-frontend:
name: Frontend Type Checking
timeout-minutes: 5
runs-on: ubuntu-latest
needs: type-check-backend
steps:
- name: Checkout Repository Code
uses: actions/checkout@v4
- name: Install pnpm Package Manager
uses: pnpm/action-setup@v4
- name: Set up Node.js Environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Download API Specs
uses: actions/download-artifact@v4
with:
name: api-specs
path: frontend/src/integrations/api
- name: Restore pnpm Cache and Node Modules
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
frontend/node_modules
key: ${{ runner.os }}-frontend-${{ hashFiles('frontend/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-frontend-
- name: Install Frontend Dependencies
working-directory: ./frontend
run: pnpm install --no-frozen-lockfile
- name: Generate API Client
working-directory: ./
run: pnpm frontend:api
- name: Run TypeScript Type Check
working-directory: ./frontend
run: pnpm tsc --noEmit