forked from LibraryOfCongress/concordia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (47 loc) · 1.41 KB
/
.travis.yml
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
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'
jobs:
allow_failures:
- language: python
python: 3.8-dev
- language: python
python: 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'