-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis-main.sh
executable file
·45 lines (35 loc) · 1.14 KB
/
travis-main.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
#!/usr/bin/env bash
set -e
if [[ "$TRAVIS_COMMIT_MESSAGE" == "[TRAVIS] Autogenerated files from travis" ]]; then
echo "This is an auto commit from travis. Not doing anything."
exit 0
fi
if [[ "$TRAVIS_BRANCH" != "master" ]]; then
echo "Not on master. Not doing anything else."
exit 0
fi
# Save some useful information
REPO=`git config remote.origin.url`
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
SHA=`git rev-parse --verify HEAD`
echo "Running test script..."
npm install
sudo apt-get install python3-pandas
sudo apt install python3-pip
pip3 install --upgrade setuptools
pip3 install pymmwr click requests urllib3 selenium webdriver-manager pyyaml
pip3 install gitpython
pip3 install pygsheets
pip3 install unidecode
python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
# only validate data on builds triggered by pull requests
#if [[ "$TRAVIS_EVENT_TYPE" == *"pull_request"* ]]; then
# source ./travis/validate-data.sh
#fi
if [[ "$TRAVIS_EVENT_TYPE" == *"cron"* ]]; then
pip3 install -U epiweeks
echo "updating truth data..."
bash ./travis/cron-master.sh
bash ./travis/push.sh
fi
echo "build complete"