Skip to content

Commit

Permalink
Maintenance: Improve CI test script to use 'bundle exec' and wait less.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Apr 29, 2024
1 parent 93ba19c commit 944e05a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ docker-compose logs --timestamps --follow &

until (curl -I --silent --fail localhost:8080 | grep -iq "HTTP/1.1 200 OK"); do
echo "wait for zammad to be ready..."
sleep 15
sleep 5
done

sleep 30

echo
echo "Success - Zammad is up :)"
echo
Expand All @@ -23,7 +21,7 @@ echo
echo "Execute autowizard..."
echo

docker exec --env=AUTOWIZARD_RELATIVE_PATH=tmp/auto_wizard.json --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 rake zammad:setup:auto_wizard
docker exec --env=AUTOWIZARD_RELATIVE_PATH=tmp/auto_wizard.json --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 bundle exec rake zammad:setup:auto_wizard

echo
echo "Autowizard executed successful :)"
Expand All @@ -34,7 +32,7 @@ echo
echo "Check DB for AutoWizard user"
echo

docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 rails r "p User.find_by(email: '[email protected]')" | grep '[email protected]'
docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 bundle exec rails r "p User.find_by(email: '[email protected]')" | grep '[email protected]'

echo
echo "Check DB for AutoWizard user successfull :)"
Expand All @@ -44,7 +42,7 @@ echo
echo "Fill DB with some random data"
echo

docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 rails r "FillDb.load(agents: 1,customers: 1,groups: 1,organizations: 1,overviews: 1,tickets: 1)"
docker exec --env=DATABASE_URL=postgres://zammad:zammad@zammad-postgresql:5432/zammad_production zammad-docker-compose_zammad-railsserver_1 bundle exec rails r "FillDb.load(agents: 1,customers: 1,groups: 1,organizations: 1,overviews: 1,tickets: 1)"

echo
echo "DB fill successful :)"
Expand Down

0 comments on commit 944e05a

Please sign in to comment.