Skip to content

Instantly share code, notes, and snippets.

@strobe
Last active April 21, 2017 02:43
Show Gist options
  • Save strobe/0a0f011cc7cd68ab7d65a6266f0848a0 to your computer and use it in GitHub Desktop.
Save strobe/0a0f011cc7cd68ab7d65a6266f0848a0 to your computer and use it in GitHub Desktop.
ensime-server tests script
#!/bin/bash
diskutil erasevolume HFS+ 'ramdisk' `hdiutil attach -nomount ram://8388608`
#!/bin/bash
export SBT_VOLATILE_TARGET=/Volumes/ramdisk
export SBT_TASK_LIMIT=4
export AKKA_TEST_TIMEFACTOR=5
export SCALA_VERSION=2.11.8
export BUILD_DIR=$PWD
echo "ensimeServerJars := Nil" > ensime.sbt ;
echo "ensimeServerProjectJars := Nil" >> ensime.sbt ;
if $(git grep -qE "TODO|FIXME" *) ; then
echo "Please remove TODO or FIXME. Create an issue at GitHub instead." ;
exit 1 ;
fi
sbt ++$SCALA_VERSION ensimeConfig ";createHeaders ;test:createHeaders ;it:createHeaders ;test:compile ;it:compile ;doc ;ensime/assembly";
if $(! git diff --exit-code --quiet) ; then
echo "Code formatting does not meet the project's standards:" ;
git --no-pager diff ;
exit 1 ;
fi
cd testing/cache && sbt ++$SCALA_VERSION ensimeConfig ensimeServerIndex && cd ../..
sbt ++$SCALA_VERSION "test" | tee tests.log ;
sbt ++$SCALA_VERSION "it:test" | tee it-tests.log ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment