-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
43 lines (38 loc) · 1.29 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
# Config file for automatic testing at travis-ci.org
# Run in Python 3 only. Drop Python 2 testing
language: python
python: '3.7'
dist: xenial
sudo: yes
# Cache modules for faster builds
cache:
timeout: 1000
pip: true
npm: true
yarn: true
# Don't cache miniconda directory. It's slower. Fresh install takes ~200s.
# But caching takes ~150s (extraction) + ~190s (re-packing) = ~340s (slower).
# directories:
# - $HOME/miniconda
install:
# Install miniconda
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh
- bash $HOME/miniconda.sh -b -u -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
# Install pip modules
- pip install flake8 pep8-naming flake8-gramex flake8-blind-except flake8-print flake8-debugger nose coverage
- npm install -g yarn
- yarn global add eclint eslint eslint-plugin-html eslint-plugin-template htmllint-cli
- yarn install
# Set up variables
- export BRANCH=$TRAVIS_BRANCH
script:
- eclint check '**/*.html' '**/*.js' '**/*.css' '**/*.yaml' '**/*.md'
- htmllint
- flake8
- bandit nlg --recursive --format csv || true
- pip install -e .
- gramex setup nlg/app
- nosetests -sv --with-coverage --cover-package=nlg