diff --git a/.travis.yml b/.travis.yml index cadf41b..8a2baac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,19 +2,44 @@ version: ~> 1.0 os: linux dist: xenial # required for Python >= 3.7 language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "nightly" -install: - - pip install mypy - - pip install coverage - - pip install pylint -script: - - mypy primes.py binary_search.py --strict - - python test.py - - coverage run --include=primes.py,test.py,binary_search.py test.py && coverage report -m --fail-under=100 --rcfile=coveragerc - - python speed_test.py --all - - python speed_test.py --fermat 6 - - pylint primes.py binary_search.py +python: "nightly" +jobs: + include: + - name: "Type check and lint" + install: + - pip install mypy + - pip install pylint + script: + - mypy primes.py binary_search.py --strict + - pylint primes.py binary_search.py + - &unit-tests + script: python test.py + name: "Unit Tests 3.6" + python: "3.6" + - <<: *unit-tests + name: "Unit Tests 3.7" + python: "3.7" + - <<: *unit-tests + name: "Unit Tests 3.8" + python: "3.8" + - <<: *unit-tests + name: "Unit Tests Nightly" + python: "nightly" + - name: "Coverage" + install: pip install coverage + script: coverage run --include=primes.py,test.py,binary_search.py test.py && coverage report -m --fail-under=100 --rcfile=coveragerc + - &speed-test + script: + - python speed_test.py --all + - python speed_test.py --fermat 6 + name: "Speed Test 3.6" + python: "3.6" + - <<: *speed-test + name: "Speed Test 3.7" + python: "3.7" + - <<: *speed-test + name: "Speed Test 3.8" + python: "3.8" + - <<: *speed-test + name: "Speed Test Nightly" + python: "nightly"