-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
justfile
170 lines (134 loc) · 2.81 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
@api: && docker-stop
-docker compose --env-file .env up backend db --build
@api-ci:
docker compose -f docker-compose-testing.yml up -d backend db
@backend-test: ci-db && docker-stop
-cd backend && \
poetry run pytest && \
cd ..
@backend-test-ci: ci-db && docker-stop
cd backend && \
poetry run pytest && \
cd ..
@black:
-cd backend && \
poetry run black app tests && \
cd ..
@black-ci:
cd backend && \
poetry run black app tests --check && \
cd ..
@build-backend-dev:
-cd backend && \
docker build -t backend:dev . && \
cd ..
@build-dev: build-backend-dev build-frontend-dev
@build-frontend-dev:
-cd frontend && \
docker build -t frontend:dev . && \
cd ..
@build-backend-prod:
-cd backend && \
docker build -t backend:latest --target prod . && \
cd ..
@build-frontend-prod:
-cd frontend && \
docker build -t frontend:latest . && \
cd ..
@build-prod: build-backend-prod build-frontend-prod
@ci-db:
docker compose -f docker-compose-testing.yml up -d db
@compose-up:
docker compose up --build
@compose-up-ci:
docker compose -f docker-compose-testing.yml up -d
@compose-up-detached:
docker compose up -d --build
@db:
docker compose up db
@docker-stop:
docker compose down
@frontend-dev:
-cd frontend && \
npm run dev && \
cd ..
@frontend-check:
-cd frontend && \
npm run check && \
cd ..
@frontend-check-ci:
cd frontend && \
npm run check && \
cd ..
@frontend-format:
-cd frontend && \
npm run format && \
cd ..
@frontend-format-ci:
cd frontend && \
npm run format && \
cd ..
@frontend-lint:
-cd frontend && \
npm run lint && \
cd ..
@frontend-lint-ci:
cd frontend && \
npm run lint && \
cd ..
@frontend-test:
-cd frontend && \
npm run test && \
cd ..
@frontend-test-ci:
cd frontend && \
npm run test
cd ..
@generate-types:
-cd frontend && \
npm run generate-types && \
cd ..
@install:
echo Installing backend
just --justfile {{justfile()}} install-backend
echo Installing frontend
just --justfile {{justfile()}} install-frontend
@install-backend:
-cd backend && \
poetry install && \
cd ..
@install-frontend:
-cd frontend && \
npm install
cd ..
@lint:
echo mypy
just --justfile {{justfile()}} mypy
echo ruff
just --justfile {{justfile()}} ruff
echo black
just --justfile {{justfile()}} black
echo frontend linting
just --justfile {{justfile()}} frontend-lint
echo frontend check
just --justfile {{justfile()}} frontend-check
@mypy:
-cd backend && \
poetry run mypy . && \
cd ..
@mypy-ci:
cd backend && \
poetry run mypy . && \
cd ..
@playwright-install:
-cd frontend && \
npx playwright install && \
cd ..
@ruff:
-cd backend && \
poetry run ruff check . && \
cd ..
@ruff-ci:
cd backend && \
poetry run ruff check --exit-non-zero-on-fix . && \
cd ..