Skip to content

Instantly share code, notes, and snippets.

@tcrayford
Last active September 26, 2018 22:07
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tcrayford/ad5d755aebcde46d4296 to your computer and use it in GitHub Desktop.
Save tcrayford/ad5d755aebcde46d4296 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
set -o pipefail
with_timestamps() {
while read -r line; do
echo -e "$(date +%T)\t$line"
done
}
run_tests() {
. .test.env
cd app
echo "starting"
(lein with-profile production uberjar) &
prod_uberjar_pid=$!
(lein with-profile ci-tests uberjar) &
test_uberjar_pid=$!
wait "$test_uberjar_pid" || { exit 1; }
echo "test uberjar finished"
wait "$prod_uberjar_pid" || { exit 1; }
echo "prod uberjar finished"
java -cp "target/production/yeller-0.1.0-SNAPSHOT-standalone.jar:target/ci-tests/yeller-0.1.0-SNAPSHOT-standalone.jar" clojure.main -e "(require 'yeller.dev) (yeller.dev/run-tests-and-exit)"
java -jar target/production/yeller-0.1.0-SNAPSHOT-standalone.jar check
cp target/production/yeller-0.1.0-SNAPSHOT-standalone.jar "$CIRCLE_ARTIFACTS/yeller.jar"
}
run_tests | with_timestamps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment