Skip to content

Commit 561a414

Browse files
authored
Travis CI: Run each failing pytest in allow_failures mode (TheAlgorithms#1087)
* Travis CI: Run failing pytest in allow_failures mode * Sync with master * Sync with master
1 parent 7cf3db1 commit 561a414

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

.travis.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,37 @@ python: 3.7
44
cache: pip
55
before_install: pip install --upgrade pip setuptools
66
install: pip install -r requirements.txt
7+
matrix:
8+
include:
9+
- name: "Main tests"
10+
# The following files currently fail pytests. See issues: #1016, #1044, #1080
11+
# Here they are run allow_failures mode and when each passes pytest, it can be
12+
# removed BOTH lists below. Complex now but simple once all files pass pytest.
13+
# - env: FILE=pytest file_transfer_protocol/ftp_client_server.py
14+
# before_script: true
15+
# script: pytest ${FILE} --doctest-modules
16+
- env: FILE=pytest file_transfer_protocol/ftp_send_receive.py
17+
before_script: true
18+
script: pytest ${FILE} --doctest-modules
19+
- env: FILE=pytest machine_learning/linear_regression.py
20+
before_script: true
21+
script: pytest ${FILE} --doctest-modules
22+
- env: FILE=pytest machine_learning/perceptron.py
23+
before_script: true
24+
script: pytest ${FILE} --doctest-modules
25+
- env: FILE=pytest machine_learning/random_forest_classification/random_forest_classification.py
26+
before_script: true
27+
script: pytest ${FILE} --doctest-modules
28+
- env: FILE=pytest machine_learning/random_forest_regression/random_forest_regression.py
29+
before_script: true
30+
script: pytest ${FILE} --doctest-modules
31+
allow_failures:
32+
- before_script: true
733
before_script:
834
- black --check . || true
935
- flake8 . --count --select=E9,F401,F63,F7,F82 --show-source --statistics
1036
script:
11-
- scripts/validate_filenames.py # no uppercase and no spaces
37+
- scripts/validate_filenames.py # no uppercase, no spaces, in a directory
1238
- mypy --ignore-missing-imports .
1339
- pytest . --doctest-modules
1440
--ignore=file_transfer_protocol/ftp_send_receive.py

0 commit comments

Comments
 (0)