group: travis_latest language: python cache: pip python: - 2.7 # - 3.6 #matrix: # allow_failures: # - python: 3.6 - Commenting out testing for Python 3.6 until ready install: - pip install -r requirements.txt - pip install flake8 # pytest # add another testing frameworks later before_script: # stop the build if there are Python syntax errors or undefined names - flake8 . --count --exclude=deps/qualysapi --select=E901,E999,F821,F822,F823 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 . --count --exit-zero --exclude=deps/qualysapi --max-complexity=10 --max-line-length=127 --statistics script: - python setup.py install # Test successful scan download and parsing - vuln_whisperer -c configs/test.ini --mock --mock_dir test - rm -rf /tmp/VulnWhisperer # Test one failed scan - rm -f test/nessus/GET_scans_exports_164_download - vuln_whisperer -c configs/test.ini --mock --mock_dir test; [[ $? -eq 1 ]] - rm -rf /tmp/VulnWhisperer # Test two failed scans - rm -f test/qualys_vuln/scan_1553941061.87241 - vuln_whisperer -c configs/test.ini --mock --mock_dir test; [[ $? -eq 2 ]] - rm -rf /tmp/VulnWhisperer # Test only nessus - vuln_whisperer -c configs/test.ini -s nessus --mock --mock_dir test; [[ $? -eq 1 ]] - rm -rf /tmp/VulnWhisperer # Test only qualy_vuln - vuln_whisperer -c configs/test.ini -s qualys_vuln --mock --mock_dir test; [[ $? -eq 1 ]] notifications: on_success: change on_failure: change # `always` will be the setting once code changes slow down