Repository navigation
57 lines (51 loc) · 1.66 KB
/
Copy pathci.yml
File metadata and controls
57 lines (51 loc) · 1.66 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
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
DATABASE_URL: postgresql://doc:doc@127.0.0.1:5432/doc?schema=public
NEXTAUTH_URL: http://localhost:3000
NEXT_PUBLIC_APP_URL: http://localhost:3000
AUTH_SECRET: ci-only-secret
COLLABORATE_API_AUTH_KEY: ci-collaboration-token
COLLABORATE_INTERNAL_API_KEY: ci-internal-token
COLLABORATE_EDIT_HTTP_URL: http://localhost:1234
NEXT_PUBLIC_COLLABORATE_EDIT_URL: ws://localhost:1234/collaborate
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- run: npx prisma generate
- run: npm run format
- run: npm run lint
- run: npm run test-ci
- run: npx playwright install --with-deps chromium
- run: npm run test:e2e -- e2e/signin.spec.ts
- run: npm run build:collaboration
- run: npm run check:cli
- run: npm run build
docker-build:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
AUTH_SECRET: ci-only-secret
COLLABORATE_API_AUTH_KEY: ci-collaboration-token
COLLABORATE_INTERNAL_API_KEY: ci-internal-token
steps:
- uses: actions/checkout@v4
# --env-file /dev/null keeps this identical to a clean checkout: a local
# .env must never be what makes the image build succeed.
- name: Validate Compose configuration
run: docker compose --env-file /dev/null config --quiet
- name: Build container images
run: docker compose --env-file /dev/null build