graphql/semaphoreci.sh
Eugen Wissner 9d15b83164 Make the tutorial to compile again
- Remove generated documentation leaving only documentation sources.
- Add CI job checking that the tutorial is up to date.
2019-07-20 07:11:10 +02:00

34 lines
577 B
Bash
Executable File

#!/bin/bash
STACK=$SEMAPHORE_CACHE_DIR/stack
setup() {
if [ ! -e "$STACK" ]
then
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C $SEMAPHORE_CACHE_DIR '*/stack'
fi
$STACK --no-terminal setup
}
setup_test() {
$STACK --no-terminal test --only-snapshot
}
test() {
$STACK --no-terminal test --pedantic
}
test_docs() {
$STACK --no-terminal ghc -- -Wall -fno-code docs/tutorial/tutorial.lhs
}
setup_lint() {
$STACK --no-terminal install hlint
}
lint() {
$STACK --no-terminal exec hlint -- src tests
}
$1