-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (55 loc) · 1.71 KB
/
Makefile
File metadata and controls
71 lines (55 loc) · 1.71 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
.PHONY: clean install-dev build publish-to-pypi lint type-check unit-tests unit-tests-cov integration-tests \
integration-tests-cov format check-code build-api-reference build-docs run-docs
# This is default for local testing, but GitHub workflows override it to a higher value in CI
INTEGRATION_TESTS_CONCURRENCY = 1
clean:
rm -rf .ty_cache .pytest_cache .ruff_cache build dist htmlcov .coverage
install-dev:
uv sync --all-extras
uv run pre-commit install
build:
uv build --verbose
# APIFY_PYPI_TOKEN_CRAWLEE is expected to be set in the environment
publish-to-pypi:
uv publish --verbose --token "${APIFY_PYPI_TOKEN_CRAWLEE}"
lint:
uv run ruff format --check
uv run ruff check
type-check:
uv run ty check
unit-tests:
uv run pytest \
--numprocesses=auto \
--verbose \
tests/unit
unit-tests-cov:
uv run pytest \
--numprocesses=auto \
--verbose \
--cov=src/apify \
--cov-report=xml:coverage-unit.xml \
tests/unit
integration-tests:
uv run pytest \
--numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) \
--verbose \
tests/integration
integration-tests-cov:
uv run pytest \
--numprocesses=$(INTEGRATION_TESTS_CONCURRENCY) \
--verbose \
--cov=src/apify \
--cov-report=xml:coverage-integration.xml \
tests/integration
format:
uv run ruff check --fix
uv run ruff format
# The check-code target runs a series of checks equivalent to those performed by pre-commit hooks
# and the run_checks.yaml GitHub Actions workflow.
check-code: lint type-check unit-tests
build-api-reference:
cd website && uv run ./build_api_reference.sh
build-docs:
cd website && uv run npm clean-install && uv run npm run build
run-docs: build-api-reference
cd website && uv run npm clean-install && uv run npm run start