Skip to content

Commit

Permalink
Remove circle tests for inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
david4096 committed May 8, 2024
1 parent 6487be4 commit 4e72654
Showing 1 changed file with 0 additions and 54 deletions.
54 changes: 0 additions & 54 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ jobs:
- create_zip_upload_to_s3:
lambdaFolder: "webhook-testing/deployment"
s3BucketFolder: "webhookTesting"
- create_fedramp_inventory_zip_upload_to_s3:
lambdaFolder: "fedramp-integrated-inventory-workbook/deployment"
lambdaRequirements: "fedramp-integrated-inventory-workbook/requirements.txt"
s3BucketFolder: "fedrampInventory"

# Make this a separate job because AWS SAM needs to run in
# the container specified in the template.yml
Expand Down Expand Up @@ -77,14 +73,6 @@ jobs:
- checkout
- install_container_dependencies
- unit_tests
python_tests:
docker:
- image: cimg/python:3.8
steps:
- checkout
- python_unit_tests:
sourceDirectory: "fedramp-integrated-inventory-workbook/deployment"
dependencies: "fedramp-integrated-inventory-workbook/requirements.txt"

commands:
sam_package_and_upload_to_s3:
Expand Down Expand Up @@ -123,31 +111,6 @@ commands:
arguments: |
--cache-control max-age=0
create_fedramp_inventory_zip_upload_to_s3:
description: "Create a deployment zip for the fedramp inventory lambda and upload to S3"
parameters:
lambdaFolder:
type: string
lambdaRequirements:
type: string
s3BucketFolder:
type: string
steps:
- run:
name: make temporary directory and copy in source files
command: cd << parameters.lambdaFolder >> && mkdir output && cp -R inventory output
- run:
name: install all requirements into the temporary directory
command: pip install -r << parameters.lambdaRequirements >> -t << parameters.lambdaFolder >>/output -U --no-deps && chmod -R 755 << parameters.lambdaFolder >>/output
- run:
name: zip source files alongside dependencies
command: (cd << parameters.lambdaFolder >>/output && zip -r8 ../function.zip . && cd .. && rm -rf output)
- aws-s3/copy:
from: << parameters.lambdaFolder >>/function.zip
to: 's3://${AWS_BUCKET}/$(echo ${CIRCLE_TAG-$CIRCLE_BRANCH} | sed "s/\//_/g")-$(echo $CIRCLE_SHA1 | cut -c -7)/<< parameters.s3BucketFolder >>/function.zip'
arguments: |
--cache-control max-age=0
check_git_secrets:
description: "Install git-secrets and scan repository to check for secrets"
steps:
Expand Down Expand Up @@ -186,23 +149,6 @@ commands:
name: run unit tests
command: bash -i -c 'npm run test'

python_unit_tests:
description: "Run unit tests for the fedramp python lambda"
parameters:
sourceDirectory:
type: string
dependencies:
type: string
steps:
- run:
name: setup python test environment
command: pip install -r << parameters.dependencies >> && pip install pytest==6.2.2 callee==0.3.1
- run:
name: run python unit tests
# The tests require you to have access to the python package, in this case, deployment/inventory/
# which is why we change directories.
command: cd << parameters.sourceDirectory >> && python -m pytest -v -s ../tests

workflows:
version: 2
everything:
Expand Down

0 comments on commit 4e72654

Please sign in to comment.