-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
63 lines (42 loc) · 1.42 KB
/
Makefile
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
DOCKER_IMAGE=thumbororg/docker-pyvips-engine
PYTHON_VERSION?=3.10
setup:
@python3 -m pip install -e .[tests]
test: docker-test flake pylint
run: docker-run
local-test: local-unit flake pylint
local-unit:
@python3 -m pytest --cov=thumbor_vips_engine tests/
format:
@python3 -m black .
flake:
@python3 -m flake8 --config .flake8
pylint:
@python3 -m pylint thumbor_vips_engine tests
local-run:
@thumbor -c thumbor.conf -l debug
publish:
@python setup.py sdist
@twine upload dist/*
@rm -rf dist/
ci-venv:
@. ~/pyvips/bin/activate
docker-build:
@docker build -t ${DOCKER_IMAGE}:latest --build-arg PYTHON_VERSION=${PYTHON_VERSION} .
docker-shell: docker-build
@docker run --rm -it -v $$(pwd):/app ${DOCKER_IMAGE}:latest /bin/bash -l
docker-run: docker-build
@docker run --rm -v $$(pwd):/app ${DOCKER_IMAGE}:latest /bin/bash -l -c "make local-run"
docker-test: docker-build docker-unit
docker-test-coverage: docker-build docker-unit-coverage
docker-unit:
@docker run --rm -v $$(pwd):/app ${DOCKER_IMAGE}:latest /bin/bash -l -c "make local-unit"
docker-unit-coverage:
@docker run --rm -v $$(pwd):/app ${DOCKER_IMAGE}:latest /bin/bash -l -c "COVERALLS_REPO_TOKEN=${COVERALLS_REPO_TOKEN} make local-unit coveralls"
coveralls:
@pip install --upgrade coveralls
@coveralls
docker-lint:
@docker run --rm -v $$(pwd):/app ${DOCKER_IMAGE}:latest /bin/bash -l -c "make flake pylint"
docker-push:
@docker push ${DOCKER_IMAGE}:latest