Include python 3.5 test, pyling, and flake8
stages:
+ - analyze
- build
- test
-build:pip:
- stage: build
+# analyze
+
+flake8:
+ # ignore:
+ # F401 - imported but unused
+ # F403 - unable to detect undefined names
+ # F405 - undefined or defined by star imports
+ # E231 - missing whitespace after ','
+ # E501 - 79 char limit
+ stage: analyze
+ allow_failure: true
+ script:
+ - python -m pip install flake8 --quiet --user
+ - python -m flake8 --ignore=F401,F403,F405,E231,E501 **/*.py
+
+pylint:
+ stage: analyze
+ allow_failure: true
+ script:
+ - pip install pylint --quiet --user
+ - pylint -d C0301,W0614 **/*.py
+
+# build
+
+pip:27:
image: python:2.7
+ stage: build
script:
- - pip install tensorflow==1.10.0 --user
- - pip install scipy --user
+ - python --version
+ - pip install tensorflow==1.10.0 --quiet --user
- pip install . --user
-test:pytest:
- stage: test
+pip:35:
+ image: python:3.5
+ stage: build
+ script:
+ - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
+ - python3 get-pip.py --user
+ - python3 -m pip install tensorflow==1.14.0 --quiet --user
+ - python3 -m pip install . --user
+
+# unit test
+
+pytest27:
image: python:2.7
+ stage: test
script:
+ - python --version
- pip install pytest==4.6.4 --quiet
+ - pytest --version
+ - pytest
+
+pytest35:
+ image: python:3.5
+ stage: test
+ script:
+ - alias python=python3
+ - alias pip="python3 -m pip"
+ - pip install pytest==4.6.4 --quiet --user
+ - pytest --version
- pytest
