Files
wger/.travis.yml
Roland Geider c4476bc68c Bump invoke
This has the effect, that the commands don't have an underscore anymore, but a
dash (as had the parameters), which does look nicer

Closes #482
2020-08-26 00:07:26 +02:00

55 lines
1.1 KiB
YAML

language: python
dist: bionic
services:
- postgresql
# Cache the pip files
cache:
directories:
- $HOME/.cache/pip
- $HOME/.nvm
- node_modules
- wger/node_modules
# Python versions to test
python:
- "3.6"
- "3.7"
- "3.8"
node_js: 10
env:
- DB=postgresql
- DB=sqlite
# Install the application
install:
# Install requirements
- pip install -r requirements_devel.txt
- python setup.py develop
- cd wger
- if [[ "$DB" = "postgresql" ]]; then pip install psycopg2; fi
# Setup application
- if [[ "$DB" = "sqlite" ]]; then wger create-settings; fi
- if [[ "$DB" = "postgresql" ]]; then wger create-settings --database-type postgresql; fi
# change back to the source folder
- cd ..
# Create test databases
before_script:
- if [[ "$DB" = "postgresql" ]]; 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:
# Regular application
- coverage run --source='.' ./manage.py test --parallel
# Code coverage
- coverage report