Skip to content

CI for frontend #152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ addons:
packages:
- libgmp-dev

env:
- COMPONENT=client
- COMPONENT=server

before_install:
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'

script:
# Set a timeout of 35 minutes. We could use travis_wait here, but travis_wait
# doesn't produce any output until the command finishes, and also doesn't
# always show all of the command's output.
- timeout 35m stack --no-terminal -j1 --install-ghc build
./ci/build.sh

notifications:
email: true
Expand Down
22 changes: 22 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#! /usr/bin/env bash

set -ex

case $COMPONENT in
server)
# Set a timeout of 35 minutes. We could use travis_wait here, but travis_wait
# doesn't produce any output until the command finishes, and also doesn't
# always show all of the command's output.
timeout 35m stack --no-terminal -j1 --install-ghc build
;;
client)
cd client
npm install
npm run build
npm run bundle
;;
*)
echo >&2 "Unrecognised component: $COMPONENT"
exit 1
;;
esac