| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,48 +15,66 @@ jobs: | |||
| 15 | 15 | runs-on: ubuntu-latest | |
| 16 | 16 | strategy: | |
| 17 | 17 | matrix: | |
| 18 | - python-version: [3.6, 3.7, 3.8, 3.9] | ||
| 18 | + python-version: [3.6, 3.7, 3.8, 3.9, "3.10.0-beta.3"] | ||
| 19 | 19 | ||
| 20 | 20 | steps: | |
| 21 | 21 | - uses: actions/checkout@v2 | |
| 22 | 22 | with: | |
| 23 | 23 | fetch-depth: 9999 | |
| 24 | 24 | - name: Set up Python ${{ matrix.python-version }} | |
| 25 | - uses: actions/setup-python@v1 | ||
| 25 | + uses: actions/setup-python@v2 | ||
| 26 | 26 | with: | |
| 27 | 27 | python-version: ${{ matrix.python-version }} | |
| 28 | 28 | - name: Install dependencies and prepare tests | |
| 29 | 29 | run: | | |
| 30 | 30 | set -x | |
| 31 | - python -m pip install --upgrade pip | ||
| 31 | + python -m pip install --upgrade pip setuptools wheel | ||
| 32 | 32 | python --version; git --version | |
| 33 | 33 | git submodule update --init --recursive | |
| 34 | 34 | git fetch --tags | |
| 35 | - | ||
| 35 | + | ||
| 36 | + pip install -r requirements.txt | ||
| 36 | 37 | pip install -r test-requirements.txt | |
| 37 | 38 | TRAVIS=yes ./init-tests-after-clone.sh | |
| 38 | - | ||
| 39 | + | ||
| 39 | 40 | git config --global user.email "travis@ci.com" | |
| 40 | 41 | git config --global user.name "Travis Runner" | |
| 41 | 42 | # If we rewrite the user's config by accident, we will mess it up | |
| 42 | 43 | # and cause subsequent tests to fail | |
| 43 | 44 | cat test/fixtures/.gitconfig >> ~/.gitconfig | |
| 45 | + | ||
| 44 | 46 | - name: Lint with flake8 | |
| 45 | - | ||
| 46 | 47 | run: | | |
| 47 | 48 | set -x | |
| 48 | 49 | pip install flake8 | |
| 49 | 50 | # stop the build if there are Python syntax errors or undefined names | |
| 50 | - flake8 --ignore=W293,E265,E266,W503,W504,E731 --count --show-source --statistics | ||
| 51 | - | ||
| 51 | + flake8 --ignore=W293,E265,E266,W503,W504,E704,E731 --count --show-source --statistics | ||
| 52 | + | ||
| 52 | 53 | - name: Check types with mypy | |
| 53 | 54 | run: | | |
| 54 | 55 | set -x | |
| 55 | - pip install tox | ||
| 56 | - tox -e type | ||
| 56 | + pip install mypy | ||
| 57 | + mypy -p git | ||
| 58 | + | ||
| 59 | + - name: Test with pytest | ||
| 60 | + run: | | ||
| 61 | + set -x | ||
| 62 | + pip install -r requirements-dev.txt | ||
| 63 | + pytest --cov --cov-report=term | ||
| 64 | + # pytest settings in tox.ini[pytest] | ||
| 65 | + continue-on-error: false | ||
| 57 | 66 | ||
| 58 | 67 | - name: Documentation | |
| 59 | 68 | run: | | |
| 60 | 69 | set -x | |
| 61 | 70 | pip install -r doc/requirements.txt | |
| 62 | 71 | make -C doc html | |
| 72 | + | ||
| 73 | + # - name: Test with nose | ||
| 74 | + # run: | | ||
| 75 | + # set -x | ||
| 76 | + # pip install nose | ||
| 77 | + # nosetests -v --with-coverage | ||
| 78 | + # continue-on-error: false | ||
| 79 | + | ||
| 80 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + -r requirements.txt | ||
| 2 | + -r test-requirements.txt | ||
| 3 | + | ||
| 4 | + pytest | ||
| 5 | + pytest-cov | ||
| 6 | + pytest-sugar | ||
| 7 | + pytest-icdiff | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,12 @@ | |||
| 1 | 1 | #!/usr/bin/env python | |
| 2 | - from __future__ import print_function | ||
| 3 | 2 | try: | |
| 4 | 3 | from setuptools import setup, find_packages | |
| 5 | 4 | except ImportError: | |
| 6 | - from ez_setup import use_setuptools | ||
| 5 | + from ez_setup import use_setuptools # type: ignore[Pylance] | ||
| 7 | 6 | use_setuptools() | |
| 8 | 7 | from setuptools import setup, find_packages | |
| 9 | 8 | ||
| 10 | - from distutils.command.build_py import build_py as _build_py | ||
| 9 | + from setuptools.command.build_py import build_py as _build_py | ||
| 11 | 10 | from setuptools.command.sdist import sdist as _sdist | |
| 12 | 11 | import fnmatch | |
| 13 | 12 | import os | |
@@ -95,7 +94,6 @@ def build_py_modules(basedir, excludes=[]): | |||
| 95 | 94 | license="BSD", | |
| 96 | 95 | url="https://github.com/gitpython-developers/GitPython", | |
| 97 | 96 | packages=find_packages(exclude=("test.*")), | |
| 98 | - # package_data={'git': ['**/*.pyi', 'py.typed']}, | ||
| 99 | 97 | include_package_data=True, | |
| 100 | 98 | py_modules=build_py_modules("./git", excludes=["git.ext.*"]), | |
| 101 | 99 | package_dir={'git': 'git'}, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,8 @@ coverage | |||
| 3 | 3 | flake8 | |
| 4 | 4 | tox | |
| 5 | 5 | virtualenv | |
| 6 | - nose | ||
| 6 | + pytest | ||
| 7 | + pytest-cov | ||
| 8 | + pytest-sugar | ||
| 7 | 9 | gitdb>=4.0.1,<5 | |
| 8 | 10 | typing-extensions>=3.7.4.3;python_version<"3.10" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ commands = coverage run --omit="git/test/*" -m unittest --buffer {posargs} | |||
| 12 | 12 | coverage report | |
| 13 | 13 | ||
| 14 | 14 | [testenv:flake8] | |
| 15 | - commands = flake8 --ignore=W293,E265,E266,W503,W504,E731 {posargs} | ||
| 15 | + commands = flake8 --ignore=W293,E265,E266,W503,W504,E704,E731 {posargs} | ||
| 16 | 16 | ||
| 17 | 17 | [testenv:type] | |
| 18 | 18 | description = type check ourselves | |
@@ -32,6 +32,30 @@ commands = {posargs} | |||
| 32 | 32 | # E731 = do not assign a lambda expression, use a def | |
| 33 | 33 | # W293 = Blank line contains whitespace | |
| 34 | 34 | # W504 = Line break after operator | |
| 35 | - ignore = E265,W293,E266,E731, W504 | ||
| 35 | + # E707 = multiple statements in one line - used for @overloads | ||
| 36 | + ignore = E265,W293,E266,E731,E704, W504 | ||
| 36 | 37 | max-line-length = 120 | |
| 37 | 38 | exclude = .tox,.venv,build,dist,doc,git/ext/ | |
| 39 | + | ||
| 40 | + [pytest] | ||
| 41 | + python_files = | ||
| 42 | + test_*.py | ||
| 43 | + | ||
| 44 | + # space seperated list of paths from root e.g test tests doc/testing | ||
| 45 | + testpaths = test | ||
| 46 | + | ||
| 47 | + # --cov coverage | ||
| 48 | + # --cov-report term # send report to terminal term-missing -> terminal with line numbers html xml | ||
| 49 | + # --cov-report term-missing # to terminal with line numbers | ||
| 50 | + # --cov-report html:path # html file at path | ||
| 51 | + # --maxfail # number of errors before giving up | ||
| 52 | + # -disable-warnings # Disable pytest warnings (not codebase warnings) | ||
| 53 | + #-rf # increased reporting of failures | ||
| 54 | + # -rE # increased reporting of errors | ||
| 55 | + # --ignore-glob=**/gitdb/* # ignore glob paths | ||
| 56 | + addopts = --cov=git --cov-report=term --maxfail=50 -rf --verbosity=0 --disable-warnings | ||
| 57 | + | ||
| 58 | + # ignore::WarningType # ignores those warnings | ||
| 59 | + # error # turn any unignored warning into errors | ||
| 60 | + filterwarnings = | ||
| 61 | + ignore::DeprecationWarning | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments