-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (74 loc) · 2.18 KB
/
ci.yml
File metadata and controls
85 lines (74 loc) · 2.18 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:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
frontend:
name: frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: frontend/package.json
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Install frontend dependencies
run: pnpm --dir frontend install --frozen-lockfile
- run: make check-front
- run: make coverage-front
- run: make build
backend:
name: backend
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: hookdiff
POSTGRES_USER: hookdiff
POSTGRES_PASSWORD: hookdiff
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_DB: hookdiff
POSTGRES_USER: hookdiff
POSTGRES_PASSWORD: hookdiff
POSTGRES_HOST: localhost
DATABASE_URL: postgres://hookdiff:hookdiff@localhost:5432/hookdiff
REDIS_URL: redis://localhost:6379/0
DJANGO_SECRET_KEY: ci-test-key
DJANGO_DEBUG: '1'
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
with:
version: "latest"
enable-cache: true
cache-dependency-glob: backend/uv.lock
- name: Install backend dependencies
run: cd backend && uv sync
- run: make check-back
- run: make coverage-back