From db7662fea60a966b19eb2491e243e10a7b1b5903 Mon Sep 17 00:00:00 2001 From: emileten Date: Wed, 21 Feb 2024 19:00:11 +0300 Subject: [PATCH] remove useless dependencies in deployment tests, turn on pull request trigger to check the action works --- .github/workflows/deploy.yaml | 11 +++++------ integration_tests/cdk/requirements.txt | 8 -------- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index c279f7e..ae5fe32 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,7 +1,9 @@ name: Test deployment on: + pull_request: merge_group: + branches: [ main ] jobs: build_package_and_deploy: @@ -54,11 +56,8 @@ jobs: cd integration_tests/cdk npx cdk synth --debug --all --require-approval never - # deploy the stack and grab URLs for testing + # deploy the stack npx cdk deploy --ci --all --require-approval never - echo "ingestor_url=$(aws cloudformation describe-stacks --stack-name eoapi-cdk-integration-test-pgSTAC-infra --query "Stacks[0].Outputs[?starts_with(OutputKey, 'stacingestor')].OutputValue | [0]" --output text)" >> $GITHUB_OUTPUT - echo "stac_api_url=$(aws cloudformation describe-stacks --stack-name eoapi-cdk-integration-test-pgSTAC-infra --query "Stacks[0].Outputs[?starts_with(OutputKey, 'pgstacapi')].OutputValue | [0]" --output text)" >> $GITHUB_OUTPUT - echo "titiler_pgstac_api_url=$(aws cloudformation describe-stacks --stack-name eoapi-cdk-integration-test-pgSTAC-infra --query "Stacks[0].Outputs[?starts_with(OutputKey, 'titilerpgstac')].OutputValue | [0]" --output text)" >> $GITHUB_OUTPUT deactivate cd - @@ -67,11 +66,11 @@ jobs: run: | cd integration_tests/cdk # run this only if we find a 'cdk.out' directory, which means there might be things to tear down + # see https://github.com/aws/aws-cdk/issues/24946 + rm -f cdk.out/synth.lock if [ -d "cdk.out" ]; then cd - source .deployment_venv/bin/activate cd integration_tests/cdk - # see https://github.com/aws/aws-cdk/issues/24946 - rm -f cdk.out/synth.lock npx cdk destroy --ci --all --force fi diff --git a/integration_tests/cdk/requirements.txt b/integration_tests/cdk/requirements.txt index 3761dc1..540a518 100644 --- a/integration_tests/cdk/requirements.txt +++ b/integration_tests/cdk/requirements.txt @@ -1,15 +1,7 @@ aws-cdk-lib>=2.99.1 -aws_cdk.aws_cognito_identitypool_alpha>=2.99.0a0 -aws-cdk.aws-apigatewayv2-alpha>=2.99.0a0 constructs>=10.0.0,<11.0.0 pydantic==2.0.2 pydantic-settings==2.0.1 -black==22.3.0 -boto3==1.24.15 -boto3-stubs[cognito-idp,cognito-identity] -flake8==4.0.1 -click==8.1.3 -requests==2.28.0 python-dotenv==1.0.0 pyyaml==6.0 types-PyYAML==6.0.12.10