Skip to content

Commit 4a9c84d

Browse files
authored
CI for frontend (#152)
* Build frontend on CI * make ci/build.sh executable
1 parent 4341a0d commit 4a9c84d

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

.travis.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ addons:
1414
packages:
1515
- libgmp-dev
1616

17+
env:
18+
- COMPONENT=client
19+
- COMPONENT=server
20+
1721
before_install:
1822
- mkdir -p ~/.local/bin
1923
- export PATH=$HOME/.local/bin:$PATH
2024
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
2125

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

2829
notifications:
2930
email: true

ci/build.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /usr/bin/env bash
2+
3+
set -ex
4+
5+
case $COMPONENT in
6+
server)
7+
# Set a timeout of 35 minutes. We could use travis_wait here, but travis_wait
8+
# doesn't produce any output until the command finishes, and also doesn't
9+
# always show all of the command's output.
10+
timeout 35m stack --no-terminal -j1 --install-ghc build
11+
;;
12+
client)
13+
cd client
14+
npm install
15+
npm run build
16+
npm run bundle
17+
;;
18+
*)
19+
echo >&2 "Unrecognised component: $COMPONENT"
20+
exit 1
21+
;;
22+
esac

0 commit comments

Comments
 (0)