forked from cherrytea-dev/la_searcher_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (35 loc) · 1.1 KB
/
Makefile
File metadata and controls
46 lines (35 loc) · 1.1 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
SRC_FUNCTIONS_REGEX := '^[a-z].*'
# all dirs not starting with underscore
venv:
uv sync --all-groups --all-extras --locked
test:
uv run pytest . -v -n 4
initdb:
uv run python tests/tools/init_testing_db.py
lint:
uv run ruff format src tests
uv run ruff check src tests --select I --fix
lint-check:
uv run ruff format src tests --check --diff
uv run ruff check src tests --select I --diff
requirements:
for d in $$(ls -1 src | grep -E ${SRC_FUNCTIONS_REGEX}); do \
uv export --extra $$d --no-hashes > src/$$d/requirements.txt; \
done
ci-test:
docker compose run --build --rm bot make initdb
docker compose run --build --rm bot make test
dependencies:
echo "Copy common code to deploy Google Cloud Functions"
echo "Don't run locally"
for d in $$(ls -1 src | grep -E ${SRC_FUNCTIONS_REGEX}); do \
cp src/_dependencies src/$$d/ -r ; \
done
smoke-tests-generate:
echo "" > build/pytest.log
uv run python tests/tools/generate_smoke_tests.py
make test > build/pytest.log || true
uv run python tests/tools/generate_smoke_tests.py
make lint
type-annotate:
uv run python tests/tools/annotate_types.py