Skip to content
Open
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
27 changes: 27 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,33 @@ jobs:
run: |
pipenv run pylint --recursive=y .

# --- Install Docker Compose ---
- name: Install Docker Compose
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.20.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version

# --- Set required environment variables for Docker Compose
- name: Set LOCAL_IMAGE_NAME and PREDICTIONS_STREAM_NAME
run: |
echo "LOCAL_IMAGE_NAME=backend-ci:latest" >> $GITHUB_ENV
echo "PREDICTIONS_STREAM_NAME=predictions-stream" >> $GITHUB_ENV

# --- Build backend image if needed
- name: Build backend Docker image
working-directory: 06-best-practices/code/integration-test
run: |
docker build -t backend-ci:latest ..

# --- Start LocalStack using docker-compose ---
- name: Start LocalStack
working-directory: 06-best-practices/code/integration-test
run: |
docker-compose up -d
sleep 10

# --- Run Integration Tests ---
- name: Integration tests
working-directory: 06-best-practices/code/integration-test
run: |
Expand Down
3 changes: 2 additions & 1 deletion 06-best-practices/code/integration-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export PREDICTIONS_STREAM_NAME="ride_predictions"

docker-compose up -d

sleep 1
sleep 10


aws --endpoint-url=http://localhost:4566 \
Expand Down Expand Up @@ -46,4 +46,5 @@ if [ $ERROR_CODE != 0 ]; then
exit ${ERROR_CODE}
fi


docker-compose down
2 changes: 1 addition & 1 deletion 06-best-practices/code/scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

echo "publishing image ${LOCAL_IMAGE_NAME} to ECR..."
echo "Publishing image ${LOCAL_IMAGE_NAME} to ECR..."