-
-
Save tcrayford/ad5d755aebcde46d4296 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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