-
Notifications
You must be signed in to change notification settings - Fork 102
/
Makefile
executable file
·47 lines (35 loc) · 876 Bytes
/
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
all: install test
.PHONY: develop
develop: install install-tools
.PHONY: install
install:
pip install -e ".[test]"
.PHONY: install-tools
install-tools:
pip install flake8 black==20.8b1
.PHONY: test
test:
# Run Pytest tests (including examples)
py.test --cov=snapshottest tests examples/pytest
# Run Unittest Example
python examples/unittest/test_demo.py
# Run nose
nosetests examples/unittest/test_demo.py
# Run Django Example
cd examples/django_project && python manage.py test
.PHONY: lint
lint:
flake8
.PHONY: format
format:
black --check setup.py snapshottest tests examples --exclude 'snapshots\/snap_.*.py$$'
.PHONY: format-fix
format-fix:
black setup.py snapshottest tests examples --exclude 'snapshots\/snap_.*.py$$'
.PHONY: clean
clean:
rm -rf dist/ build/
.PHONY: publish
publish: clean
python3 setup.py sdist bdist_wheel
twine upload dist/*