-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (83 loc) · 2.35 KB
/
Copy pathci.yml
File metadata and controls
101 lines (83 loc) · 2.35 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
backend:
name: Backend
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: libraryforge_ci
POSTGRES_USER: libraryforge
POSTGRES_PASSWORD: libraryforge_ci
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U libraryforge -d libraryforge_ci"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DJANGO_SECRET_KEY: libraryforge-ci-only-secret-key-7f2f3564f85c4b16b7230a327ae30fae
DJANGO_DEBUG: "false"
DJANGO_ALLOWED_HOSTS: localhost,127.0.0.1
DJANGO_CSRF_TRUSTED_ORIGINS: http://localhost:5173
DJANGO_SECURE_COOKIES: "true"
DJANGO_SECURE_SSL_REDIRECT: "false"
DJANGO_TRUST_X_FORWARDED_PROTO: "false"
LIBRARYFORGE_ALLOWED_LIBRARY_ROOTS: /tmp
LIBRARYFORGE_ALLOWED_OUTPUT_ROOTS: /tmp
POSTGRES_DB: libraryforge_ci
POSTGRES_USER: libraryforge
POSTGRES_PASSWORD: libraryforge_ci
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: "5432"
FFPROBE_PATH: ffprobe
defaults:
run:
working-directory: backend
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install uv and Python
uses: astral-sh/setup-uv@v9.0.0
with:
python-version: "3.13"
working-directory: backend
enable-cache: true
- name: Synchronize backend dependencies
run: uv sync --frozen --dev
- name: Django system check
run: uv run python manage.py check
- name: Django deployment check
run: uv run python manage.py check --deploy
- name: Run backend tests
run: uv run pytest
frontend:
name: Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Node
uses: actions/setup-node@v4.4.0
with:
node-version: "24"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
run: npm ci
- name: Build frontend
run: npm run build