Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (46 sloc) 1.37 KB
language: python
env:
global:
- PIPENV_IGNORE_VIRTUALENVS=1
- DJANGO_SETTINGS_MODULE=concordia.settings_test
dist: xenial
sudo: required
addons:
sonarcloud:
organization: 'libraryofcongress'
python:
- '3.8'
- '3.8-dev'
- 'nightly'
matrix:
allow_failures:
- python:
- 3.8-dev
- nightly
services:
- postgresql
- redis-server
cache:
directories:
- $HOME/.cache/pre-commit
before_script:
- psql -c 'create database concordia;' -U postgres
install:
- pip install --upgrade pip
- pip install coveralls "pipenv>=2018.11.26"
- pipenv install --dev --deploy
# We want to have safety available but aren't putting it in the dev tools:
- pipenv run pip install safety
script:
- mkdir logs
- touch ./logs/concordia-celery.log
- npm install
- npx gulp build
- pipenv run ./manage.py collectstatic --no-input
- pipenv run coverage run ./manage.py test
- git fetch --unshallow
- git diff --name-only $TRAVIS_COMMIT_RANGE | xargs pipenv run pre-commit run --files
- pipenv run safety check
- npx --quiet csstree-validator static/css/
after_success:
- 'if [[ $TRAVIS_PYTHON_VERSION == "3.7" ]]; then git fetch --unshallow --tags; pipenv run coverage xml; sonar-scanner -Dsonar.projectVersion="$(pipenv run python setup.py --version)"; coveralls; fi'
You can’t perform that action at this time.