-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (88 loc) · 2.75 KB
/
Copy pathci.yml
File metadata and controls
102 lines (88 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: CI
# Runs on every push to main and every PR targeting main.
# Backend: uv sync + smoke import + pytest collect (graceful when no tests yet).
# Dashboard: npm ci + build + lint.
# Both jobs are independent and run in parallel.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
backend:
name: Backend — uv sync + pytest
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: |
backend/uv.lock
backend/pyproject.toml
- name: Set up Python 3.11
run: uv python install 3.11
- name: Sync dependencies
run: uv sync --frozen || uv sync
- name: Smoke-import FastAPI app
run: uv run python -c "import main; assert main.app.title == 'LocalMate'"
env: &backend-env
SUPABASE_URL: https://stub.supabase.co
SUPABASE_ANON_KEY: stub-anon-key
SUPABASE_SERVICE_ROLE_KEY: stub-service-role-key
STRIPE_SECRET_KEY: sk_stub
STRIPE_PRICE_ID: price_stub
STRIPE_WEBHOOK_SECRET: whsec_stub
STRIPE_GST_RATE_ID: ""
ANTHROPIC_API_KEY: sk-ant-stub
RESEND_API_KEY: re_stub
TWILIO_ACCOUNT_SID: ACstub
TWILIO_AUTH_TOKEN: stub
TWILIO_AU_NUMBER: "+61400000000"
DATAFORSEO_LOGIN: stub@login
DATAFORSEO_PASSWORD: stubpass
GBP_CLIENT_ID: stub-client-id
GBP_CLIENT_SECRET: stub-client-secret
BASE_DOMAIN: crewcircle.com.au
PROJECT_ID: localmate
ENVIRONMENT: ci
ENCRYPTION_KEY: ""
SUPABASE_JWT_SECRET: ""
YELP_API_KEY: stub-yelp
SENTRY_DSN: ""
SQUARE_ACCESS_TOKEN: ""
SQUARE_ENVIRONMENT: sandbox
- name: Run pytest
run: uv run pytest tests/ -v --tb=short
env: *backend-env
dashboard:
name: Dashboard — Next.js build
runs-on: ubuntu-latest
defaults:
run:
working-directory: dashboard
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: dashboard/package-lock.json
- name: Install deps
run: npm ci
- name: Lint
run: npm run lint
continue-on-error: true
- name: Type-check + build
run: npm run build
env:
# Required by Next.js at build time when env vars are read.
NEXT_PUBLIC_API_URL: https://api.localmate.crewcircle.com.au