-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (44 loc) · 1.18 KB
/
Makefile
File metadata and controls
57 lines (44 loc) · 1.18 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
.PHONY: test lint format install dev-install clean
# Install dependencies
install:
poetry install
# Install with dev dependencies
dev-install:
poetry install --with dev
# Run tests
test:
poetry run pytest python/test/ -v
# Run tests with coverage
test-cov:
poetry run pytest python/test/ -v --cov=python/oguild --cov-report=xml
# Run linting
lint:
poetry run python -m flake8 python/ --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run python -m flake8 python/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# Run all checks (like CI)
ci: lint test-cov
# Test workflow locally with act
test-workflow:
act -W .github/workflows/test.yml -j test --env MATRIX_PYTHON_VERSION=3.11
# Run manual tests via Docker
test-manual:
docker compose up --build --abort-on-container-exit
# Clean up
clean:
rm -rf .pytest_cache
rm -rf coverage.xml
rm -rf htmlcov
rm -rf dist
rm -rf build
rm -rf alias/dist
rm -rf alias/build
# Build both packages
build-all:
poetry build
cd alias && poetry build
# Publish both packages to PyPI
publish-all:
poetry publish
cd alias && poetry publish
# Build and publish both packages
release: build-all publish-all