Skip to content

Commit

Permalink
Using run-platform.sh script for build test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Ritwik G <[email protected]>
  • Loading branch information
ritwik-g authored Jan 20, 2025
1 parent 6c22fc3 commit 6a1d1d0
Showing 1 changed file with 24 additions and 30 deletions.
54 changes: 24 additions & 30 deletions .github/workflows/ci-container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ on:
branches:
- main
- development
paths:
- 'backend/**'
- 'frontend/**'
- 'unstract/**'
- 'platform-service/**'
- 'x2text-service/**'
- 'runner/**'
- 'docker/dockerfiles/**'
# paths:
# - 'backend/**'
# - 'frontend/**'
# - 'unstract/**'
# - 'platform-service/**'
# - 'x2text-service/**'
# - 'runner/**'
# - 'docker/dockerfiles/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- development
paths:
- 'backend/**'
- 'frontend/**'
- 'unstract/**'
- 'platform-service/**'
- 'x2text-service/**'
- 'runner/**'
- 'docker/dockerfiles/**'
# paths:
# - 'backend/**'
# - 'frontend/**'
# - 'unstract/**'
# - 'platform-service/**'
# - 'x2text-service/**'
# - 'runner/**'
# - 'docker/dockerfiles/**'

jobs:
build:
Expand All @@ -49,20 +49,14 @@ jobs:
- name: Container Run
working-directory: ./docker
run: |
cp ../backend/sample.env ../backend/.env
cp ../platform-service/sample.env ../platform-service/.env
cp ../prompt-service/sample.env ../prompt-service/.env
cp ../runner/sample.env ../runner/.env
cp ../x2text-service/sample.env ../x2text-service/.env
cp sample.essentials.env essentials.env
cp sample.env .env
./run-platform.sh -b
docker compose -f docker-compose.yaml up -d
sleep 10
docker compose -f docker-compose.yaml ps -a
docker compose -f docker/docker-compose.yaml up -d
sleep 30
docker compose -f docker/docker-compose.yaml ps -a
# Get the names of exited containers
custom_format="{{.Name}}\t{{.Image}}\t{{.Service}}"
EXITED_CONTAINERS=$(docker compose -f docker-compose.yaml ps -a --filter status=exited --format "$custom_format")
EXITED_CONTAINERS=$(docker compose -f docker/docker-compose.yaml ps -a --filter status=exited --format "$custom_format")
line_count=$(echo "$EXITED_CONTAINERS" | wc -l)
Expand All @@ -76,9 +70,9 @@ jobs:
# Print logs of exited containers
IFS=$'\n'
for SERVICE in $SERVICE; do
docker compose -f docker-compose.yaml logs "$SERVICE"
docker compose -f docker/docker-compose.yaml logs "$SERVICE"
done
docker compose -f docker-compose.yaml down -v
docker compose -f docker/docker-compose.yaml down -v
exit 1
fi
docker compose -f docker-compose.yaml down -v
docker compose -f docker/docker-compose.yaml down -v

0 comments on commit 6a1d1d0

Please sign in to comment.