-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
38 lines (30 loc) · 1.08 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
GOPATH ?= $(HOME)/go
setup:
pip install -U pip
pip install -e .[build-tools]
scripts/genpb2.sh
pip install -e .[dev]
pre-commit install
lint: format
mypy platform_container_runtime tests
format:
ifdef CI
pre-commit run --all-files --show-diff-on-failure
else
pre-commit run --all-files
endif
test_unit:
pytest -vv --cov=platform_container_runtime --cov-report xml:.coverage-unit.xml tests/unit
test_integration: minikube_image_load
echo tests/integration/k8s/* | xargs -n 1 kubectl --context minikube apply -f
kubectl --context minikube get po -o name | xargs -n 1 kubectl --context minikube wait --for=jsonpath='{.status.phase}'=Running
kubectl --context minikube get po
pytest -vv --cov=platform_container_runtime --cov-report xml:.coverage-integration.xml tests/integration
docker_build:
rm -rf build dist
pip install -U build
python -m build
docker build -t platformcontainerruntime:latest .
minikube_image_load: docker_build
docker tag platformcontainerruntime:latest localhost/platformcontainerruntime:latest
minikube image load localhost/platformcontainerruntime:latest