forked from fluent-ffmpeg/node-fluent-ffmpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-travis.sh
executable file
·59 lines (39 loc) · 1.12 KB
/
test-travis.sh
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
#!/bin/bash
# Stop on error
set -e
# Install dependencies
echo travis_fold:start:Dependencies
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz
tar xf ffmpeg-release-amd64-static.tar.xz
mkdir -p $HOME/bin
cp ffmpeg-*-static/{ffmpeg,ffprobe} $HOME/bin
cp ffmpeg-*-static/{ffmpeg,ffprobe} $(pwd)
export PATH=$(pwd)/bin:$PATH
export ALT_FFMPEG_PATH=$(pwd)/ffmpeg
export ALT_FFPROBE_PATH=$(pwd)/ffprobe
if [ -z "$(which flvtool2)" ]; then
export FLVTOOL2_PRESENT=no
else
export FLVTOOL2_PRESENT=yes
fi
echo travis_fold:end:Dependencies
# Install nvm if needed
echo travis_fold:start:nvm
if [ ! -d ~/.nvm ]; then
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.6.1/install.sh | sh
fi
source ~/.nvm/nvm.sh
nvm install $NODE_VERSION
echo travis_fold:end:nvm
# Print versions
echo travis_fold:start:Versions
echo "node version: $(node --version)"
echo "npm version: $(npm --version)"
echo "ffmpeg version: $(ffmpeg -version)"
echo travis_fold:end:Versions
# Install dependencies
echo travis_fold:start:npm-install
npm install
echo travis_fold:end:npm-install
# Run tests
make test