Skip to content

Commit

Permalink
Adding a new test for GitHub Actions (stable)
Browse files Browse the repository at this point in the history
  • Loading branch information
MothScientist committed Feb 4, 2024
1 parent 7d98faa commit caee5e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/run_scripts_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ jobs:
echo "SECRET_KEY=${SECRET_KEY}" >> .env
echo "BOT_TOKEN=${BOT_TOKEN}" >> .env
echo "DATABASE=${DATABASE}" >> .env
ls .env
cd ..
- name: Run scripts test
Expand Down
9 changes: 4 additions & 5 deletions run_scripts_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ CONTAINER_NAME="budget-control-container"
echo "Running the deploy.sh script..."

# Building and running the container
sh -x ./deploy.sh
./deploy.sh
# sh -x ./deploy.sh

sleep 5 # time to start the container

Expand All @@ -22,10 +23,8 @@ if [ "$(docker inspect --format='{{.State.Running}}' "$CONTAINER_NAME")" = "true
docker stop $CONTAINER_NAME
else
echo "Container started: FAILED"
CONTAINER_ID=$(docker ps -aqf "name=$CONTAINER_NAME")
reason=$(docker inspect --format '{{.State.ExitCode}} {{.State.Error}}' "$CONTAINER_ID")
echo "Reason for stopping the container: $reason"
docker logs "$CONTAINER_ID"
# CONTAINER_ID=$(docker ps -aqf "name=$CONTAINER_NAME")
# docker logs "$CONTAINER_ID"
exit 1
fi

Expand Down

0 comments on commit caee5e1

Please sign in to comment.