-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
64 lines (43 loc) · 1.92 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
.ONESHELL:
PATH_VENV := /tmp/centurion_erp
ACTIVATE_VENV :=. ${PATH_VENV}/bin/activate
.PHONY: clean prepare docs ansible-lint lint test
prepare:
git submodule update --init;
git submodule foreach git submodule update --init;
python3 -m venv ${PATH_VENV};
${ACTIVATE_VENV};
pip install -r website-template/gitlab-ci/mkdocs/requirements.txt;
pip install -r gitlab-ci/lint/requirements.txt;
pip install -r gitlab-ci/mkdocs/requirements.txt;
pip install -r requirements.txt;
pip install -r requirements_test.txt;
npm install markdownlint-cli2;
npm install markdownlint-cli2-formatter-junit;
cp -f "website-template/.markdownlint.json" ".markdownlint.json";
cp -f "gitlab-ci/lint/.markdownlint-cli2.jsonc" ".markdownlint-cli2.jsonc";
markdown-mkdocs-lint:
PATH=${PATH}:node_modules/.bin markdownlint-cli2 docs/*.md docs/**/*.md docs/**/**/*.md docs/**/**/**/*.md docs/**/**/**/**/**/*.md !docs/pull_request_template.md !CHANGELOG.md !gitlab-ci !website-template || true
docs-lint: markdown-mkdocs-lint
docs: docs-lint
${ACTIVATE_VENV}
mkdocs build --clean
lint: markdown-mkdocs-lint
test:
cd app
pytest -s --cov --cov-report term --cov-report xml:../artifacts/coverage_unit_functional.xml --cov-report html:../artifacts/coverage/unit_functional/ --junit-xml=../artifacts/unit_functional.JUnit.xml **/tests/unit **/tests/functional
test-functional:
cd app
pytest -s --cov --cov-report term --cov-report xml:../artifacts/coverage_functional.xml --cov-report html:../artifacts/coverage/functional/ --junit-xml=../artifacts/functional.JUnit.xml **/tests/functional
test-unit:
cd app
pytest -s --cov --cov-report term --cov-report xml:../artifacts/coverage_unit.xml --cov-report html:../artifacts/coverage/unit/ --junit-xml=../artifacts/unit.JUnit.xml **/tests/unit
clean:
rm -rf ${PATH_VENV}
rm -rf artifacts
rm -rf pages
rm -rf build
rm -rf node_modules
rm -f package-lock.json
rm -f package.json
rm -rf .pytest_cache