-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
56 lines (50 loc) · 1.51 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
49
50
51
52
53
54
55
56
language: python
# set Python versions to be tested on
python:
- 3.6
- 3.7
- 3.8
- 3.9
# install and update pip, clone bandit repo
before_install:
- echo "Upgrading pip"
- python3 -m pip install --upgrade pip
# install all required libraries and dependancies
install:
- echo "Install project dependancies and requirements"
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- pip3 install codecov
- pip3 install coverage
- pip3 install pytest
- pip3 install pytest-cov
- pip3 install flake8 pytest
- pip3 install bandit
- pip3 install safety
- pip3 install pydot
- pip3 install pydotplus
- pip3 install Cython
- pip3 install google-cloud
- pip3 install google-cloud-storage
- pip3 install graphviz
- sudo apt-get install graphviz
# TRAVIS_ALLOW_FAILURE:
# set to true if the job is allowed to fail.
script:
- echo "Running unit tests..."
- python3 -m unittest discover
- echo "Running pytest tests..."
- python3 -m pytest tests/
- echo "Running flake8 tests..."
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- echo "Running Bandit tests..."
# - ./bandit/scan.sh
- echo "Running coverage report..."
# - pytest --cov-report term --cov=psp tests/
# - python3 -m safety check > package_safety_output.txt
- echo "Running model locally"
- python3 main.py --config="dummy"
after_success:
- codecov
- coveralls
- echo "Build success"