Skip to content

Split Travis config into jobs #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
57 changes: 41 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"