-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from kbalk/common-requirements
Consolidate common requirements to make dependabot happy
- Loading branch information
Showing
13 changed files
with
75 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
FROM plus3it/tardigrade-ci:0.14.1 | ||
FROM plus3it/tardigrade-ci:0.16.1 | ||
|
||
COPY ./lambda/src/requirements.txt /src/requirements.txt | ||
COPY ./lambda/tests/requirements_dev.txt /tests/requirements_dev.txt | ||
COPY ./lambda/src/requirements.txt /lambda/src/requirements.txt | ||
COPY ./lambda/tests/requirements_dev.txt /lambda/tests/requirements_dev.txt | ||
COPY ./tests/requirements_test.txt /tests/requirements_test.txt | ||
COPY ./requirements_common.txt /requirements_common.txt | ||
|
||
RUN python -m pip install --no-cache-dir \ | ||
-r /src/requirements.txt \ | ||
-r /tests/requirements_dev.txt \ | ||
-r /lambda/src/requirements.txt \ | ||
-r /lambda/tests/requirements_dev.txt \ | ||
-r /tests/requirements_test.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
FROM plus3it/tardigrade-ci:0.14.1 | ||
FROM plus3it/tardigrade-ci:0.16.1 | ||
|
||
COPY ./tests/requirements_test.txt /tests/requirements_test.txt | ||
COPY ./requirements_common.txt /requirements_common.txt | ||
|
||
RUN python -m pip install --no-cache-dir -r /tests/requirements_test.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,26 @@ | ||
SHELL := /bin/bash | ||
export PYTHONPATH := $(PYTHONPATH):./lambda/src | ||
export TERRAFORM_PYTEST_DIR := tests | ||
|
||
include $(shell test -f .tardigrade-ci || curl -sSL -o .tardigrade-ci "https://raw.githubusercontent.com/plus3it/tardigrade-ci/master/bootstrap/Makefile.bootstrap"; echo .tardigrade-ci) | ||
|
||
pytest/install: | ||
@ $(MAKE) install/pip/$(@D) PYPI_PKG_NAME=$(@D) | ||
.PHONY: pytest/deps | ||
pytest/deps: | ||
@ echo "[@] Installing dependencies used for unit and integration tests" | ||
@ python -m pip install \ | ||
-r lambda/tests/requirements_dev.txt \ | ||
-r tests/requirements_test.txt | ||
|
||
.PHONY: python/deps | ||
python/deps: | ||
@ echo "[$@] Installing package dependencies" | ||
@ echo "[$@] Installing lambda dependencies" | ||
@ python -m pip install -r lambda/src/requirements.txt | ||
|
||
.PHONY: python/test | ||
python/test: | guard/program/pytest | ||
python/test: | ||
@ echo "[$@] Starting Python tests" | ||
pytest lambda/tests | ||
@ echo "[$@]: Tests executed!" | ||
|
||
.PHONY: terraform/pytest | ||
terraform/pytest: | guard/program/terraform guard/program/pytest | ||
@ echo "[$@] Starting test of Terraform lambda installation" | ||
@ echo "[$@] LocalStack must be running; 'make localstack/up' can " | ||
@ echo "[$@] be used to start LocalStack" | ||
@ echo "[$@] Terraform 'apply' command is slow ... be patient !!!" | ||
pytest tests | ||
@ echo "[$@]: Completed successfully!" | ||
|
||
.PHONY: localstack/pytest localstack/up localstack/down localstack/clean | ||
localstack/pytest: | guard/program/terraform guard/program/pytest | ||
.PHONY: mockstack/pytest/lambda | ||
mockstack/pytest/lambda: | guard/program/terraform guard/program/pytest | ||
@ echo "[$@] Running Terraform tests against LocalStack" | ||
DOCKER_RUN_FLAGS="--network tests_default --rm -e LOCALSTACK_HOST=localstack" \ | ||
TARDIGRADE_CI_DOCKERFILE=Dockerfile_test \ | ||
IMAGE_NAME=new-account-trust-policy-integration-test:latest \ | ||
$(MAKE) docker/run target=terraform/pytest | ||
@ echo "[$@]: Completed successfully!" | ||
|
||
localstack/up: | guard/program/terraform guard/program/pytest | ||
@ echo "[$@] Starting LocalStack container" | ||
docker-compose -f tests/docker-compose-localstack.yml up --detach | ||
|
||
localstack/down: | guard/program/terraform guard/program/pytest | ||
@ echo "[$@] Stopping LocalStack container" | ||
docker-compose -f tests/docker-compose-localstack.yml down | ||
|
||
localstack/clean: | localstack/down | ||
@ echo "[$@] Stopping and removing LocalStack container and images" | ||
set +o pipefail; docker images | grep lambci | \ | ||
awk '{print $$1 ":" $$2}' | xargs -r docker rmi | ||
set +o pipefail; docker images | grep new-account-trust-policy | \ | ||
awk '{print $$1 ":" $$2}' | xargs -r docker rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
aws-lambda-powertools==1.17.1 | ||
boto3==1.17.109 | ||
boto3==1.18.2 | ||
aws-assume-role-lib==1.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
moto==2.0.11 | ||
pytest==6.2.3 | ||
moto==2.1.0 | ||
-r ../../requirements_common.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pytest==6.2.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
tftest==1.6.0 | ||
pytest==6.2.3 | ||
localstack-client==1.21 | ||
-r ../requirements_common.txt |