-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
53 lines (45 loc) · 1.14 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
language: rust
rust: nightly
cache:
- cargo: true
- directories:
- backend/target
- node_modules
- "$TRAVIS_HOME/.npm"
- "$TRAVIS_HOME/.nvm"
addons:
chrome: stable
# Install same version of wasm-bindgen-cli as of wasm-bindgen in Cargo.lock
_INSTALL_WASM_BINDGEN_CLI: &INSTALL_WASM_BINDGEN_CLI
|
wanted_version=$(sed -n '/^name = "wasm-bindgen"$/{N;s/.*\nversion = "\(.*\)"$/\1/p}' backend/Cargo.lock)
if ! which wasm-bindgen &>/dev/null; then
should_install=true
else
current_version=$(wasm-bindgen --version | cut -d' ' -f2)
if [ "$wanted_version" != "$current_version" ]; then
should_install=true
fi
fi
if [ -n "$should_install" ]; then
cargo install --version "$wanted_version" wasm-bindgen-cli
fi
install:
- nvm install v14.17.6
- *INSTALL_WASM_BINDGEN_CLI
- make dependencies
script:
- set -e
- export CHROMIUM_BIN=/usr/bin/google-chrome
- make test
- make release
deploy:
- provider: script
script: ./deploy-on-netlify.sh
on:
all_branches: true
edge: true
- provider: pages
token: $GITHUB_TOKEN
local_dir: dist
edge: true