This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
/
Makefile
72 lines (56 loc) · 1.71 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
70
71
72
install:
pip3 install -e .
install-dev:
pip3 install -e ".[dev]"
dev:
python3 -m venv dev
echo "\nNow run: \n\n. dev/bin/activate\n"
flake8-lint:
flake8 *.py lambdaguard/ tests/
isort-lint:
isort --check-only --recursive *.py lambdaguard/ tests/
black-lint:
black --check *.py lambdaguard/ tests/
lint: isort-lint black-lint flake8-lint
format:
isort --recursive *.py lambdaguard/ tests/
black *.py lambdaguard/ tests/
unit:
pytest --show-capture=all -v tests/unit
coverage:
coverage run --source=lambdaguard/ --branch -m pytest tests/unit --junitxml=build/test.xml -v
coverage xml -i -o build/coverage.xml
coverage report
test: lint unit
aws:
aws cloudformation deploy \
--stack-name LambdaGuard \
--capabilities CAPABILITY_NAMED_IAM \
--template-file aws/iam-user.json
aws cloudformation describe-stacks \
--stack-name LambdaGuard \
--query "Stacks[0].Outputs"
clean:
aws cloudformation delete-stack --stack-name LambdaGuard
set -e
find . -iname "dist" -exec rm -rf {} \;
find . -iname "build" -exec rm -rf {} \;
find . -iname "dev" -exec rm -rf {} \;
find . -iname "*.DS_Store*" -exec rm -rf {} \;
find . -iname "*__pycache__*" -exec rm -rf {} \;
find . -iname "*.pytest_cache*" -exec rm -rf {} \;
find . -iname "lambdaguard.egg-info" -exec rm -rf {} \;
find . -iname "lambdaguard_output" -exec rm -rf {} \;
python3 setup.py clean
sudo pip3 uninstall lambdaguard
dist:
rm -rf dist
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
test-pip:
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps lambdaguard
sonarqube:
docker build -t sonarqube -f SonarQube.Dockerfile .
docker run -d -p 9000:9000 sonarqube
python3 sonarqube-setup.py
.PHONY: clean dist