-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 2.22 KB
/
Copy pathci.yml
File metadata and controls
85 lines (72 loc) · 2.22 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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Lint & Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: rasg_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/rasg_test?schema=public
DIRECT_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/rasg_test?schema=public
NUXT_TELEMETRY_DISABLED: '1'
NODE_ENV: test
# Mock secrets — required only so `nuxt prepare` / module init doesn't throw on missing keys.
AUTH_SECRET: ci-mock-auth-secret-not-for-production
AUTH_ORIGIN: http://localhost:3000
STRIPE_PK: pk_test_ci_mock
STRIPE_SK: sk_test_ci_mock
STRIPE_WEBHOOK_SECRET: whsec_ci_mock
XAI_API_KEY: ci-mock
OPENMODERATOR_API_KEY: ci-mock
CDN_URL: https://cdn.topiqu.com
EMAIL_FROM: ci@example.com
NUXT_MAIL_USER: ci@example.com
AWS_ACCESS_KEY_ID: ci-mock
AWS_SECRET_ACCESS_KEY: ci-mock
AWS_REGION: eu-central-1
AWS_S3_BUCKET_NAME: ci-mock-bucket
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Cache Nuxt build artifacts
uses: actions/cache@v4
with:
path: |
.nuxt
node_modules/.cache
key: nuxt-${{ runner.os }}-${{ hashFiles('package.json', 'bun.lock', 'nuxt.config.ts') }}
restore-keys: |
nuxt-${{ runner.os }}-
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Generate ZenStack / Prisma client
run: bun run zenstack:generate
- name: Apply database migrations
run: bun run prisma:deploy
- name: Lint
run: bun run lint
- name: Test
run: bun run test