Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/serverless-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
node-version: "16"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pip install --upgrade pip pre-commit poetry
npm install -g aws-cdk
make deps
pip install -r dev_requirements.txt
pip install -r lambda_requirements.txt
npm install -g aws-cdk
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,5 @@ $RECYCLE.BIN/
cdk.out
.build
.vscode
dev_requirements.txt
lambda_requirements.txt
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@


dev:
pipenv install -d
pip install --upgrade pip pre-commit poetry
make deps
pre-commit install
poetry shell

lint:
@echo "Running flake8"
Expand All @@ -28,8 +30,8 @@ mypy-lint:
mypy --pretty service docs/examples cdk tests

deps:
pipenv requirements --dev > dev_requirements.txt
pipenv requirements > lambda_requirements.txt
poetry export --only=dev --without-hashes --format=requirements.txt > dev_requirements.txt
poetry export --without=dev --without-hashes --format=requirements.txt > lambda_requirements.txt

unit:
pytest tests/unit --cov-config=.coveragerc --cov=service --cov-report xml
Expand All @@ -51,7 +53,7 @@ pipeline-tests:
deploy:
make deps
mkdir -p .build/lambdas ; cp -r service .build/lambdas
mkdir -p .build/common_layer ; pipenv requirements > .build/common_layer/requirements.txt
mkdir -p .build/common_layer ; poetry export --without=dev --without-hashes --format=requirements.txt > .build/common_layer/requirements.txt
cdk deploy --app="python3 ${PWD}/app.py" --require-approval=never

destroy:
Expand Down
21 changes: 13 additions & 8 deletions Makefile_windows
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
.PHONY: dev lint complex coverage pre-commit yapf sort deploy destroy deps unit integration e2e pipeline-tests docs lint-docs



dev:
pipenv install -d
pip install --upgrade pip pre-commit poetry
make deps
pre-commit install
poetry shell

lint:
@echo "Running flake8"
flake8 service\* cdk\* tests\* docs\examples\* --exclude patterns='build,cdk.json,cdk.context.json,.yaml'
@echo "Running mypy"
make mypy-lint

complex:
@echo "Running Radon"
Expand All @@ -23,8 +25,11 @@ pre-commit:
pre-commit run -a --show-diff-on-failure

deps:
pipenv requirements --dev > dev_requirements.txt
pipenv requirements > lambda_requirements.txt
poetry export --only=dev --without-hashes --format=requirements.txt > dev_requirements.txt
poetry export --without=dev --without-hashes --format=requirements.txt > lambda_requirements.txt

mypy-lint:
mypy --pretty service docs\examples cdk tests

unit:
pytest tests\unit --cov-config=.coveragerc --cov=service --cov-report xml
Expand All @@ -49,11 +54,11 @@ deploy:
rmdir /S /Q .build\lambdas\service
echo D | xcopy /f /y service .build\lambdas\service /s
if not exist ".build\common_layer" mkdir ".build\common_layer"
pipenv requirements > .build\common_layer\requirements.txt
cdk deploy --app="python cdk\my_service\app.py" --require-approval=never
poetry export --without=dev --without-hashes --format=requirements.txt > .build\common_layer\requirements.txt
cdk deploy --app="python app.py" --require-approval=never

destroy:
cdk destroy --app="python cdk\my_service\app.py" --force
cdk destroy --app="python app.py" --force

docs:
mkdocs serve
Expand Down
36 changes: 0 additions & 36 deletions Pipfile

This file was deleted.

Loading