Python/.travis.yml
AlexDvorak 9456e81437 Seperate client and server of FTP (#1106)
* added sample file to transfer

* split client and server into separate files

* client and server now work in python2

* server works on python3

* client works on python3

* allow configurable ONE_CONNECTION_ONLY for testing server

* allow testing of ftp server + client

* use f-strings

* removed single letter vars

* fixed bad quote marks

* clearer file handler names

* 'with open() as' syntax

* unicode and emojis in the test data

* s -> sock

* consistent comment spacing

* remove closing formalities

* swap in and out_file

* f-string

* if __name__ == '__main__':
2019-08-07 15:44:48 +02:00

48 lines
2.0 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

language: python
dist: xenial # required for Python >= 3.7
python: 3.7
cache: pip
before_install: pip install --upgrade pip setuptools
install: pip install -r requirements.txt
matrix:
include:
- name: "Main tests"
# The following files currently fail pytests. See issues: #1016, #1044, #1080
# Here they are run allow_failures mode and when each passes pytest, it can be
# removed BOTH lists below. Complex now but simple once all files pass pytest.
# - env: FILE=pytest file_transfer_protocol/ftp_client_server.py
# before_script: true
# script: pytest ${FILE} --doctest-modules
- env: FILE=pytest file_transfer_protocol/ftp_send_receive.py
before_script: true
script: pytest ${FILE} --doctest-modules
- env: FILE=pytest machine_learning/linear_regression.py
before_script: true
script: pytest ${FILE} --doctest-modules
- env: FILE=pytest machine_learning/perceptron.py
before_script: true
script: pytest ${FILE} --doctest-modules
- env: FILE=pytest machine_learning/random_forest_classification/random_forest_classification.py
before_script: true
script: pytest ${FILE} --doctest-modules
- env: FILE=pytest machine_learning/random_forest_regression/random_forest_regression.py
before_script: true
script: pytest ${FILE} --doctest-modules
allow_failures:
- before_script: true
before_script:
- black --check . || true
- flake8 . --count --select=E9,F401,F63,F7,F82 --show-source --statistics
script:
- scripts/validate_filenames.py # no uppercase, no spaces, in a directory
- mypy --ignore-missing-imports .
- pytest . --doctest-modules
--ignore=file_transfer_protocol/ftp_send_receive.py
--ignore=machine_learning/linear_regression.py
--ignore=machine_learning/perceptron.py
--ignore=machine_learning/random_forest_classification/random_forest_classification.py
--ignore=machine_learning/random_forest_regression/random_forest_regression.py
after_success:
- scripts/build_directory_md.py > DIRECTORY.md
- cat DIRECTORY.md