Skip to content
This repository was archived by the owner on Apr 21, 2020. It is now read-only.

Commit c123d70

Browse files
committed
Add a .run-tests.sh for CI
1 parent 4902fd4 commit c123d70

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.run-tests.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
network=irc.tenthbit.net
3+
channel=programming
4+
repo=eval-so/frontend
5+
export _JAVA_OPTIONS="-Xms256m -Xmx512m"
6+
results=`mktemp`
7+
sbt update | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" > $results
8+
sbt test | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" >> $results
9+
10+
statuscode="$?"
11+
url=`http -f POST https://www.refheap.com/api/paste contents="$(cat $results)" private=true | python -c 'import json,sys;print json.load(sys.stdin)["url"]+"/raw"'`
12+
http -f POST http://rcmp.tenthbit.net/$network/$channel payload="{\"custom_ci\": 1, \"commit\": \"$(git log -1 --format=%h)\", \"branch\": \"$(git rev-parse --abbrev-ref HEAD)\", \"repository_name\": \"$repo\", \"results_url\": \"$url\", \"status\": \"$statuscode\"}"

0 commit comments

Comments
 (0)