Browse Source

Make Travis Pass Again

Peter Justin 6 years ago
parent
commit
66e6366756
7 changed files with 47 additions and 53 deletions
  1. 19 13
      .travis.yml
  2. 0 1
      requirements-cov.txt
  3. 2 2
      requirements-dev.txt
  4. 0 2
      requirements-lint.txt
  5. 0 7
      requirements-test.txt
  6. 0 4
      requirements-travis.txt
  7. 26 24
      tox.ini

+ 19 - 13
.travis.yml

@@ -1,42 +1,48 @@
+os: linux
+dist: xenial
 language: python
 python:
   - 2.7
-  - 3.4
   - 3.5
   - 3.6
-env:
+  - 3.7
 matrix:
   fast_finish: true
   include:
     - python: 2.7
       env: TOXENV=py27-unpinned
-    - python: 3.6
-      env: TOXENV=flake8
-    - python: 3.6
-      env: TOXENV=py36-unpinned
-    - python: 3.6
+    - python: 3.7
+      env: TOXENV=py37-unpinned
+    - python: 3.7
       env: TOXENV=black
-    # see the following issue on why 3.7 is weirdo
-    # https://github.com/travis-ci/travis-ci/issues/9815
     - python: 3.7
-      dist: xenial
-      sudo: true
+      env: TOXENV=flake8
   allow_failures:
     # until the entire code base is properly formatted
     # allow failures to occur here rather than doing a
     # big all at once reformat that could hide errors
     - env: TOXENV=black
+    - env: TOXENV=flake8
+
 install:
-- pip install -r requirements-travis.txt
+- pip install -r requirements-dev.txt
+- pip install tox-travis
+
 script:
 - flaskbb translations compile
 - tox
+
 after_success:
-- coverage combine tests
+- coverage combine
 - codecov
+
+cache:
+- pip
+
 notifications:
   webhooks: https://www.travisbuddy.com/
   on_success: never
+
 deploy:
   provider: pypi
   user: sh4nks

+ 0 - 1
requirements-cov.txt

@@ -1 +0,0 @@
-coverage>=4.5.1

+ 2 - 2
requirements-dev.txt

@@ -1,11 +1,11 @@
-#-rrequirements.txt
+-rrequirements.txt
 Sphinx
 alabaster
 bumpversion>=0.5.3
 cov-core
 coverage
 flake8
-flake8-bugbear
+flake8-bugbear ; python_version>'3.5'
 freezegun
 py
 pytest

+ 0 - 2
requirements-lint.txt

@@ -1,2 +0,0 @@
-flake8>=3.5.0
-flake8-bugbear>=18.2.0

+ 0 - 7
requirements-test.txt

@@ -1,7 +0,0 @@
--rrequirements-cov.txt
-flake8==3.6.0
-freezegun==0.3.11
-mock==2.0.0 ; python_version<'3.3'
-pytest==4.1.1
-pytest-mock==1.10.0
-responses==0.10.5

+ 0 - 4
requirements-travis.txt

@@ -1,4 +0,0 @@
--r requirements-cov.txt
--rrequirements.txt
-tox-travis>=0.10
-codecov>=2.0.15

+ 26 - 24
tox.ini

@@ -1,53 +1,55 @@
 [tox]
-envlist = flake8,py{27,34,35,36,37},cov-report,cov-store
+skip_missing_interpreters=true
+envlist =
+    py{35,36,37},
+    flake8,
+    coverage_report
 
 [testenv]
 use_develop = true
 deps =
-    -r{toxinidir}/requirements-test.txt
+    -r{toxinidir}/requirements-dev.txt
     # setup.py has unpinned dependencies by default
-    !unpinned: -r{toxinidir}/requirements.txt
+    !unpinned: -r{toxinidir}/requirements-dev.txt
 setenv =
     COVERAGE_FILE = tests/.coverage.{envname}
     PYTHONDONTWRITEBYTECODE=1
 commands =
     coverage run -m pytest {toxinidir}/tests {toxinidir}/flaskbb {posargs}
 
-[testenv:flake8]
-skip_install = true
-deps = -r{toxinidir}/requirements-lint.txt
-basepython=python3.6
-commands =
-    flake8 --version
-    flake8 --config={toxinidir}/tox.ini {toxinidir}/flaskbb {toxinidir}/tests
-
-[testenv:cov-report]
+[testenv:coverage_report]
 skip_install = true
-setenv =
-    COVERAGE_FILE = tests/.coverage
-deps =
-    -r{toxinidir}/requirements-cov.txt
 commands =
     coverage combine tests
     coverage report
 
-[testenv:cov-store]
+[testenv:codecov]
 skip_install = true
-setenv =
-    COVERAGE_FILE = tests/.coverage
-deps =
-    -r{toxinidir}/requirements-cov.txt
+deps = codecov
 commands =
-    coverage html
-
+    coverage combine tests
+    coverage report
+    codecov
 
 [testenv:black]
 skip_install = true
 deps = black
-basepython=python3.6
+basepython=python3.7
 commands = black --check tests/ flaskbb/
 
+[testenv:flake8]
+skip_install = true
+basepython=python3.7
+commands =
+    flake8 --version
+    flake8 --config={toxinidir}/tox.ini {toxinidir}/flaskbb {toxinidir}/tests
+
 [flake8]
+# B = bugbear
+# E = pycodestyle errors
+# F = flake8 pyflakes
+# W = pycodestyle warnings
+# B9 = bugbear opinions
 ignore = E203, E712, E711, W503
 select = C,E,F,W,B,B9
 max-complexity = 10