-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 979 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
DOCKERNAME := mausspaun/MouseArmTransformer
docker:
docker build -t ${DOCKERNAME} .
test:
PYTHONPATH=. python3 -m pytest -vvv tests/
test_docker: docker build
docker run -v $(shell pwd)/tests:/app/tests:ro \
-w /app -u $(shell id -u) \
-it ${DOCKERNAME} \
python3 -m pytest -vvv /app/tests
test_contents:
tar tf dist/MouseArmTransformer-*.tar.gz | sort | diff tests/contents.tgz.lst -
unzip -lqq dist/MouseArmTransformer-*.whl | sed -e 's/ \+/@/g' | cut -d@ -f4 | sort | diff tests/contents.whl.lst -
tests/contents.tgz.lst:
tar tf dist/MouseArmTransformer-0.2.0.tar.gz | sort > tests/contents.tgz.lst
tests/contents.whl.lst:
unzip -lqq dist/MouseArmTransformer-*.whl | sed -e 's/ \+/@/g' | cut -d@ -f4 | sort > tests/contents.whl.lst
build:
docker run -v $(shell pwd):/app \
-w /app -u $(shell id -u) \
--tmpfs /.local \
--tmpfs /.cache \
-it python:3.10 \
bash -c "(pip install build && python -m build)"
.PHONY: docker test_docker test build