-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjustfile
60 lines (44 loc) · 1.12 KB
/
justfile
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
set dotenv-load
DEV_COMPOSE := justfile_directory() + "/docker/dev/docker-compose.yml"
# Recipes
@default:
just --list
build:
docker-compose -f {{ DEV_COMPOSE }} pull
docker-compose -f {{ DEV_COMPOSE }} build
docker-compose -f {{ DEV_COMPOSE }} run --entrypoint=bash --rm --no-deps web -c "npm ci"
@compose +ARGS:
docker-compose -f {{ DEV_COMPOSE }} {{ ARGS }}
@start:
honcho start
@manage +ARGS:
./manage.py {{ ARGS }}
@pip +ARGS:
pip {{ ARGS }}
test *ARGS:
TEST=true ./manage.py test {{ ARGS }}
coverage:
TEST=true coverage run ./manage.py test --keepdb
coverage report
coverage html
format:
ruff check . --fix
black .
djlint website/ --reformat
npm run format
lint: lint_python lint_node
lint_python:
ruff check .
black --check .
mypy . --show-error-codes
djlint website/ --lint --check
@lint_node:
npm run lint
@sh:
docker-compose -f {{ DEV_COMPOSE }} up -d
docker-compose -f {{ DEV_COMPOSE }} exec web bash
@sh-root:
docker-compose -f {{ DEV_COMPOSE }} up -d
docker-compose -f {{ DEV_COMPOSE }} exec --user=root web bash
@down:
docker-compose -f {{ DEV_COMPOSE }} down