diff --git a/.github/workflows/MLPipelinePullRequest.yml b/.github/workflows/MLPipelinePullRequest.yml index bd0e857..0d0f661 100644 --- a/.github/workflows/MLPipelinePullRequest.yml +++ b/.github/workflows/MLPipelinePullRequest.yml @@ -94,6 +94,17 @@ jobs: run: | docker logs $(docker ps -al -q) + - name: Test Lambda endpoint again + run: | + sleep 2 + curl -X POST "http://localhost:9000/2015-03-31/functions/function/invocations" \ + -H "Content-Type: application/json" \ + -d "{\"body\": \"{\\\"file_location\\\": \\\"s3://retrofit-data-dev/sap_change_model/sample_data_for_cicd/${timestamp}/sample_test.parquet\\\", \\\"property_id\\\": 1, \\\"portfolio_id\\\": 4, \\\"created_at\\\": \\\"now\\\", \\\"testing\\\": true}\"}" + + - name: Get Lambda logs + run: | + docker logs $(docker ps -al -q) + - name: Stop Lambda container run: | docker stop lambda_test || echo "Container already stopped"