Commit Graph

11 Commits

Author SHA1 Message Date
Stanislav Levin
3f33ac88bd Make pycodestyle results identical
Currently, pycodestyle is running on:
- make fastlint:
  `$(PYTHON) -m pycodestyle --diff`

  According to docs:
  ```
  The project options are read from the [pycodestyle] section of the
  tox.ini file or the setup.cfg file located in any parent folder of the
  path(s) being processed.
  ```

  So, pycodestyle respects tox.ini:
  ```
  [pycodestyle]
  # E402 module level import not at top of file
  # W504 line break after binary operator
  ignore = E402, W504
  ```

- PR Travis `lint`:
  `pycodestyle --ignore=W504 --diff &> $PEP8_ERROR_LOG ||:`

  According to docs:
  ```
  Please note that if the option –ignore=errors is used, the
  default configuration will be overridden and ignore only the
  check(s) you skip.
  ```

  So, pycodestyle doesn't respect tox.ini.

For now, fastlint ignores E402, W504, while Travis lint ignores only W504.
This issue is exposed by Azure Pipelines, which employs fastlint.

Fixes: https://pagure.io/freeipa/issue/7962
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2019-05-28 10:01:23 +03:00
Christian Heimes
21f14e9893 Remove Python 2 support and packages
Remove Python 2 related code and configuration from spec file, autoconf
and CI infrastructure. From now on, FreeIPA 4.8 requires at least Python
3.6. Python 2 packages like python2-ipaserver or python2-ipaclient are
no longer available. PR-CI, lint, and tox aren't testing Python 2
compatibility either.

See: https://fedoraproject.org/wiki/Changes/FreeIPA_Python_2_Removal
Fixes: https://pagure.io/freeipa/issue/7568
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
2018-09-06 17:39:00 +02:00
Stanislav Laznicka
952b45a3a4 Travis: ignore 'line break after binary operator'
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2018-05-24 09:54:26 +02:00
Christian Heimes
9e640190ee
Run tox tests for PyPI packages on Travis
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Tomas Krizek <tkrizek@redhat.com>
2017-11-20 17:01:59 +01:00
Stanislav Laznicka
6c88eb8097 travis: pep8 changes to pycodestyle
Travis CI environment changes pep8 into pycodestyle, do the
transition on our side as well

Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
2017-10-25 09:59:28 +02:00
Martin Basti
5fdd0a3f60 Travis: build only py2 packages for py2 testing
We will testing both py2 and py3 packages, first step is use only py2
builds for testing py2 packages

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2017-06-20 12:36:29 +02:00
Martin Babinsky
9b5b713150 Travis CI: actually return non-zero exit status when the test job fails
The original code did not actually propagate the test runner exit status
to parent process so Travis CI job was always green.

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
2017-01-09 15:22:51 +01:00
Martin Babinsky
0ef55a91ef Trim the test runner log to show only pytest failures/errors
If we get to the `run-tests` phase, we no longer care about messages
from previous steps so we can truncate the log output to only show
pytest failures/errors, reducing log size.

As a fallback, the previous behaviour to print last 5000 log lines was
kept in the case the CI tests fail during setup.

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2017-01-05 16:21:51 +01:00
Martin Babinsky
4abd3f554a Add license headers to the files used by Travis CI
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2017-01-05 16:21:51 +01:00
Martin Babinsky
f48d6fc168 Travis CI: use specific Python version during build
This is a preparatory work for the future requirement of running
Python2/3 jobs simultaneously.

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2017-01-05 16:21:51 +01:00
Martin Babinsky
1267e3e723 Travis CI: a separate script to run test tasks
this script is intended only for use in Travis CI and contains
configuration of the test run requested:

    * it can run linter step separately by specifying TASK_TO_RUN="lint"
      environment variable in .travis.yml. In this case it also runs
      pep8 checker on the commits in PR.
    * other steps are run in developer mode in order to skip pylint run
      and speed up the task
    * in all cases the CI result log is populated and can be displayed
      if the job fails

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Reviewed-By: Fraser Tweedale <ftweedal@redhat.com>
2017-01-05 16:21:51 +01:00