-
Notifications
You must be signed in to change notification settings - Fork 41
/
Makefile
69 lines (54 loc) · 1.54 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
64
65
66
67
68
69
all: help
.PHONY: help
help:
@echo "Available targets:"
@echo "- build: python package building"
@echo "- package: package osc-cli for various platforms"
@echo "- test: run all tests"
@echo "- test-pre-commit: run pre-commit tests"
@echo "- test-pylint: check code with pylint"
@echo "- test-bandit: security check with bandit"
@echo "- test-mypy: run typing tests"
@echo "- test-int: run integration tests"
@echo "- test-pytest: run unit-tests"
@echo "- pypi-upload: upload package to pypi (be careful)"
@echo "- clean: clean temp files, venv, etc"
.PHONY: package
package:
cd pkg && ./configure --wget-json-search --py3_ver=11 --arch_old=2014 && make
.PHONY: test
test: clean test-pre-commit test-pylint test-bandit test-mypy test-int test-pytest build
@echo "All tests OK"
.PHONY: test-pre-commit
test-pre-commit:
pre-commit run --all-files
.PHONY: test-pylint
test-pylint: .venv/ok
@./tests/test_pylint.sh
.PHONY: test-bandit
test-bandit: .venv/ok
@./tests/test_bandit.sh
.PHONY: test-mypy
test-mypy:
./tests/test_mypy.sh
.PHONY: test-int
test-int: .venv/ok
./tests/test_int.sh
.PHONY: test-pytest
test-pytest: .venv/ok
./tests/test_pytest.sh
.PHONY: build
build: .venv/ok
@./tests/build.sh
.PHONY: pypi-upload
pypi-upload: .venv/ok
. .venv/bin/activate && twine upload dist/*
pkg/osc-cli-completion.bash:
make -C pkg/ osc-cli-completion.bash
osc_sdk/osc-cli-completion.bash: pkg/osc-cli-completion.bash
cp pkg/osc-cli-completion.bash osc_sdk/
.venv/ok:
@./tests/setup_venv.sh
.PHONY: clean
clean:
rm -rf .venv osc_sdk.egg-info dist