-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (54 loc) · 1.52 KB
/
ci.yml
File metadata and controls
66 lines (54 loc) · 1.52 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
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
test-and-build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: tigerpath
POSTGRES_USER: tigerpath
POSTGRES_PASSWORD: tigerpath
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U tigerpath"
--health-interval=5s
--health-timeout=5s
--health-retries=10
env:
DATABASE_URL: postgres://tigerpath:tigerpath@localhost:5432/tigerpath
DJANGO_SETTINGS_MODULE: config.settings.development
DJANGO_VITE_DEV_MODE: "False"
PYTHONUNBUFFERED: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Django migrations
run: python manage.py migrate --noinput
- name: Django system checks
run: python manage.py check
- name: Run Python tests
run: pytest
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.8"
- name: Install frontend dependencies
run: cd frontend && bun install --frozen-lockfile
- name: Build frontend
run: cd frontend && bun run build