-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjustfile
More file actions
133 lines (80 loc) · 2.53 KB
/
Copy pathjustfile
File metadata and controls
133 lines (80 loc) · 2.53 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SPDX-FileCopyrightText: 2023-2025 Legadilo contributors
#
# SPDX-License-Identifier: AGPL-3.0-or-later
postgres_url := "postgres://django:django_passwd@localhost:5432/legadilo"
default:
just --list
update-deps:
npm update
npm --prefix browser-extension update
uv sync --upgrade --all-groups
just check
git commit -am "chore: update deps"
dev:
docker compose -f local.yml up
dev-local-python:
docker compose -f local.yml --profile mail up -d
python manage.py runserver
dev-local-python-pg:
docker compose -f local.yml --profile postgres --profile mail up -d postgres mailpit
DATABASE_URL="{{postgres_url}}" python manage.py runserver
update-feeds:
uv run python manage.py update_feeds
setup-dev-database:
uv run python manage.py migrate
uv run python manage.py setup_test_db
setup-python-ci:
sudo apt-get update
sudo apt-get install -y gettext
uv sync --dev --locked
setup-ci: setup-python-ci
npm ci
npm ci --prefix browser-extension
test:
uv run pytest
test-coverage:
uv run pytest --cov --cov-report term:skip-covered --cov-fail-under=90
lint:
uv run pre-commit run -a
makemigrations:
uv run python manage.py makemigrations
migrate:
uv run python manage.py createcachetable
uv run python manage.py migrate
migrate-pg:
DATABASE_URL="{{postgres_url}}" uv run python manage.py migrate
clean-dev-container:
docker compose -f local.yml down
update-po:
uv run python manage.py makemessages --all --no-location
compile-po:
uv run python manage.py compilemessages
build-production-images:
docker compose -f production.yml build --pull django
test-production-images: build-production-images
docker run --rm \
--env-file ./devops/envs/local/django \
--env IS_PRODUCTION=true \
--env DJANGO_SECRET_KEY=ci \
--env DJANGO_ADMIN_URL=/admin/ \
legadilo_production_django:latest \
python manage.py check
[working-directory('browser-extension')]
test-browser-extension:
npm test
[working-directory('browser-extension')]
watch-test-browser-extension:
npm run test:watch
[working-directory('browser-extension')]
build-browser-extension:
npm run build
check: lint test-coverage test-browser-extension
ci:
docker compose -f ci.yml up --build --detach --force-recreate
docker compose -f ci.yml exec django just ci-run
docker compose -f ci.yml down
just test-production-images
ci-run:
bash ./devops/scripts/local-ci.sh
release:
bash ./devops/scripts/release.sh