Sha256: 72d37bbd9e0388b5621d1471f10ff0417b4c28c1961087d9db1106d39396df8a
Contents?: true
Size: 772 Bytes
Versions: 1
Compression:
Stored size: 772 Bytes
Contents
#!/usr/bin/env bash DOCKE_COMPOSE_ARGS="-f docker-compose.ci.yml run" <% if(selected?(:database, :mysql) || selected?(:database, :postgresql))-%> function test_<%=get(:database).to_s%> { docker-compose $DOCKE_COMPOSE_ARGS test sh -c 'nc -z $<%=get(:database).to_s.upcase%>_HOST $<%=get(:database).to_s.upcase%>_PORT' } count=0 # Chain tests together by using && until ( test_<%=get(:database).to_s%> && echo "Services ready" ) do ((count++)) if [ ${count} -gt 50 ] then echo "Services didn't become ready in time" exit 1 else echo "Waiting for services to become ready..." fi sleep 0.2 done <% end-%> docker-compose $DOCKE_COMPOSE_ARGS test /exec bundle exec rake db:setup docker-compose $DOCKE_COMPOSE_ARGS test /exec bundle exec rspec spec
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
potassium-2.0.0 | lib/potassium/assets/bin/cibuild.erb |