Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Update travis configuration

Peter van der Does68f75842eea1
diff --git a/.travis.yml b/.travis.yml
index c3b95637e..d99d115c8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,22 +28,28 @@ env:
# Install the application
install:
- - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
+ # Update nvm and set wanted Node version.
+ # We update nvm using the script method instead of git, which is selected
+ # automatically, as git won't work because the $HOME/.nvm is not a git
+ # repository and the directory is not empty.
+ - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.4/install.sh | METHOD=script bash
+ - . $HOME/.nvm/nvm.sh
+ - nvm install $TRAVIS_NODE_VERSION
- nvm use $TRAVIS_NODE_VERSION
- - npm install
-
- - sh -c "if [ '$DB' = 'postgresql' ]; then pip install psycopg2; fi"
+ # Install requirements
- pip install -r requirements_devel.txt
- - sh -c "if [ '$DB' = 'sqlite' ]; then invoke create_settings; fi"
- - sh -c "if [ '$DB' = 'postgresql' ]; then invoke create_settings --database-type postgresql; fi"
- npm install
+ - if [[ "$DB" = "postgresql" ]]; then pip install psycopg2; fi
+
+ # Setup application
+ - if [[ "$DB" = "sqlite" ]]; then invoke create_settings; fi
+ - if [[ "$DB" = "postgresql" ]]; then invoke create_settings --database-type postgresql; fi
# Create test databases
before_script:
- - sh -c "if [ '$DB' = 'postgresql' ]; then psql -c 'DROP DATABASE IF EXISTS test_wger;' -U postgres; fi"
- - sh -c "if [ '$DB' = 'postgresql' ]; then psql -c 'CREATE DATABASE test_wger;' -U postgres; fi"
- - npm install -g gulp
+ - if [[ "$DB" = "postgresq" ]]; then psql -c 'DROP DATABASE IF EXISTS test_wger;' -U postgres; fi
+ - if [[ "$DB" = "postgresql" ]]; then psql -c 'CREATE DATABASE test_wger;' -U postgres; fi
# Do the tests
script: