-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
68 lines (68 loc) · 2.72 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
matrix:
include:
- language: rust
rust: nightly
cache: cargo
sudo: true
dist: trusty
os: linux
addons:
apt:
packages:
- sqlite3
before_script:
- ( cargo install diesel_cli --no-default-features --features sqlite || true )
- export PATH=$PATH:~/.cargo/bin
- echo "DATABASE_URL=oration.db" > .env
- diesel migration run
- cargo update
script:
- cargo build
- cargo test
after_success:
# Upload docs
- |
if [[ "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" ]]; then
cargo rustdoc -- --document-private-items &&
cp logo/logo_wbl.svg target/doc/ &&
echo "<meta http-equiv=refresh content=0;url=oration/index.html>" > target/doc/index.html &&
git clone https://github.com/davisp/ghp-import.git &&
./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc &&
echo "Uploaded documentation"
fi
# Coverage report
- |
`RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin`
bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)
echo "Uploaded code coverage"
- language: node_js
node_js: node
os: linux
cache:
directories:
- sysconfcpus
- node_modules
- app/elm/elm-stuff/build-artifacts
- app/elm/tests/elm-stuff/build-artifacts
before_install:
- | # epic build time improvement - see https://github.com/elm-lang/elm-compiler/issues/1473#issuecomment-245704142
if [ ! -d sysconfcpus/bin ]; then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi
install:
- npm install -g [email protected] elm-test elm-coverage elm-css
- mv $(npm config get prefix)/bin/elm-make $(npm config get prefix)/bin/elm-make-old
- echo -e "#\!/bin/bash\\n\\necho \"Running elm-make with sysconfcpus -n 2\"\\n\\n$TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make-old \"\$@\"" > $(npm config get prefix)/bin/elm-make
- chmod +x $(npm config get prefix)/bin/elm-make
script:
- cd app/elm
- elm-make --yes
- elm-css Stylesheets.elm
- elm-coverage .
- bash <(curl -s https://codecov.io/bash)