summaryrefslogtreecommitdiff
path: root/tox.ini
Commit message (Collapse)AuthorAgeFilesLines
* Retry yarn package installsJames E. Blair2021-05-031-0/+1
| | | | | | | | | We're seeing occasional npm install failures in jobs; retry the "yarn install" command if it fails. Also, pass the YARN_REGISTRY env var in the tox remote job. Change-Id: Ic80dccf0869ce805368f678eafcfdf48f8bf9bea
* Use ZooKeeper TLS in testsJames E. Blair2021-03-081-0/+8
| | | | | | | | This mirrors the configuration in Nodepool for using TLS-enabled ZooKeeper in tests. We use the ensure-zookeeper role in order to get a newer ZooKeeper than is supplied in bionic. Change-Id: I14413fccbc9a6a7a75b6233d667e2a1d2856d894
* Decouple mypy from toxSorin Sbarnea2020-12-091-1/+1
| | | | | | | | | This allows mypy to produce the same results regardless how is called. For example IDEs will produce the same results as tox -e linters instead of displaying violations which the core team decided to disable. Change-Id: I20eeafc0549f78e3d4f9636793cfe031389b6bbe
* Bump mypy to 0.790Tobias Henkel2020-12-091-1/+1
| | | | | | | The currently used version 0.740 throws syntax errors when used with python 3.9. Change-Id: If5cd0da2d5a77126e9ac4c4d6db7a6552f1bd067
* Add zuul-client testingMatthieu Huin2020-09-291-0/+8
| | | | | | | | | | | | | | | Define unit testing for the zuul-client CLI. The actual testing job will be defined in a subsequent patch to the zuul-client project. These tests are stored in the zuul repository rather than in zuul-client's because we rely on zuul's test framework to bootstrap zuul and zuul-web, which is not available through zuul's python package. This is similar to what is done for nodepool's functional testing with zuul. Change-Id: I156162279c5d638ef39d22fcfb043655890c2d6e Depends-On: https://review.opendev.org/751291
* Use npm mirrors in tox jobsTobias Henkel2020-07-281-0/+1
| | | | | | | | | | | | Opendev runs a caching mirror for npm packages. Use it when running yarn install during tox tests. Due to the way yarn.lock files work at the moment we need to patch the lockfile on the fly to inject the mirror urls [1]. This can be handlel inside the pip.sh where we patch the lockfile, run yarn and reset it afterwards. [1] https://github.com/yarnpkg/yarn/issues/2566 Change-Id: Id1f2daac8327f3110e6beeb2d6391baccfd3ce34
* Merge "Add DOCKER_* to passenv"Zuul2020-04-291-8/+10
|\
| * Add DOCKER_* to passenvSorin Sbarnea2020-04-281-8/+10
| | | | | | | | | | | | | | | | | | | | | | We missed including DOCKER_* to tox passenv and that prevented use of docker for users that are using other hosts. Most notable option is DOCKER_HOST but any docker specific options should be passed, so the docker commands keep their behaviors. This also sorts passenv list, to ease maintenance. Change-Id: Iac436da1202066541fc98eb94a2a228e6cf8b337
* | Bump mypy for py3.8 supportClark Boylan2020-04-271-1/+1
|/ | | | | | | | | | | | | mypy depends on typed-ast which relatively recently added python 3.8 support. Unfortunately the mypy we were using requires an older typed-ast and fails under python 3.8. Fix this by bumping mypy up to a level where minimal code changes are necessary. The code changes we made ignore type conflicts due to redefinition on conditional imports. Comments include link back to a bug describing this issue and workaround in mypy. Change-Id: Iec69a27b16a1e09eb6bfbcf8d68deb1ae68d42a3
* tox: do not install bindep for lintersAntoine Musso2020-04-021-0/+1
| | | | | | | The binary dpeendencies are not needed to run flake8, mypy or openapi-spec-validator. Change-Id: I373b503f90b05183a3ad39b1707259068c5d4cc5
* tox: rename pep8 to lintersAntoine Musso2020-04-021-2/+2
| | | | | | | | | | | | | | | | pep8 is legacy, we now use flake8 and the virtual environment also runs mypy and openapi-spec-validator. Rename the virtualenv from 'pep8' to 'linters'. Use tox-linters instead of tox-pep8. tox-pep8 skips test-setup.sh Ia140b331ae1502fcf1f685faa6dace117d77d35d Done for tox-linters by Idc72c7d1a88fff8e738c896e2482b5cb1d844600 Depends-On: Idc72c7d1a88fff8e738c896e2482b5cb1d844600 Change-Id: I1fbd8335a2353f750f49b6a763eefc6f399a7143
* Declare support for Python3.8Jeremy Stanley2020-03-111-1/+1
| | | | | | | | | | | | Replace our tox-py37 job with tox-py38, extend the list of trove classifiers for Python versions in package metadata, and replace the "py35" in the tox.ini envlist with just "py3" so that folks running `tox` unqualified on their systems will use whatever python3 interpreter they have on hand (odds are it's in our supported range these days). Also uncap python-daemon so we use a version compatible with Python >=3.8. Change-Id: I4b382bb89847d3ae2b20292d923c3c2211dfb254
* Don't set OS_LOG_DEFAULTS if unsetTobias Henkel2020-02-171-1/+0
| | | | | | | | | | | | | | | We currently set the OS_LOG_DEFAULTS in tox to an empty string if it's unset. This essentially overwrites the default levels defined in our base test class to debug level for everything. This makes the tox logs hard to read because especially kazoo and gear are very chatty in the debug level. Further the excessive logging often exceeds the lengh limitation of stestr when the test fails. To mitigate this remove OS_LOG_DEFAULTS from setenv and leave it in passenv so we take the zuul test case default when it's not defined from outside. Change-Id: I8f634f1ca5cc028018f181a07e204b55788759fa
* Merge "tox: reduce deps used for pep8 env"Zuul2020-01-221-0/+4
|\
| * tox: reduce deps used for pep8 envAntoine Musso2020-01-211-0/+4
| | | | | | | | | | | | | | | | | | | | Linters are only used by the 'pep8' virtual environment, we do not need them in other test environment. Also 'pep8' only requires the three linters it used and the other modules are not needed. Move the pep8 dependencies to the pep8 testenv. Change-Id: I3a8436cbff9e2386cf0e0f5b0d1742283e647b56
* | tox: pass --slowest to stestrAntoine Musso2020-01-211-2/+1
|/ | | | | | | Since version 2.0.0, `stestr run` supports passing `--slowest` to show the slowest tests. Change-Id: I015781402962e5518f650057f32ba8c7f168aea9
* Merge "Don't install zuul in the bindep tox testenv"Zuul2019-10-141-0/+1
|\
| * Don't install zuul in the bindep tox testenvJeremy Stanley2019-10-141-0/+1
| | | | | | | | | | | | | | | | | | Running bindep doesn't rely on the zuul source or any of its dependencies installed, so set usedevelop to False ensuring only bindep and its dependencies are installed (which is much quicker and less likely to raise unrelated dependency errors in the process). Change-Id: I886857e22ed953efdaab5b6247d1e15039806f48
* | Merge "web: add OpenAPI documentation"Zuul2019-07-161-0/+1
|\ \
| * | web: add OpenAPI documentationTristan Cacqueray2019-06-121-0/+1
| | | | | | | | | | | | | | | | | | | | | This change adds a swagger description of the REST API. The description is rendered in the sphinx user documentations and in the web interface. Change-Id: I753524f40a09874dab5952f14ab17025525bbab9
* | | Merge "Increase test timeout to 6 minutes"Zuul2019-06-121-1/+1
|\ \ \
| * | | Increase test timeout to 6 minutesJeremy Stanley2019-06-121-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | We're regularly seeing the test_plugins unit test exceed our 260s hard timeout fixture on slow job nodes, so increase the base timeout from 4 minutes to 6 to accommodate this. Also bump the wait timeout in test_plugins from 3 to 4 minutes. Change-Id: I46a0f84b43c3e7c15919f3681d50e32aa7d3b89f
* | | Fix test-logs.sh utility for multi-ansibleTobias Henkel2019-05-251-1/+0
|/ / | | | | | | | | | | | | Since the multi-ansible work the test-logs.sh script is broken and needs to be fixed to use the managed ansible. Change-Id: I271f45d9f096a05949900ba1dd2bf8321c459815
* | Merge "tox: Integrate tox-docker"Zuul2019-05-171-2/+7
|\ \
| * | tox: Integrate tox-dockerStephen Finucane2019-04-031-2/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to start a zookeeper instance via docker as part of the standard tox process, avoiding issues like those described in [1]. It's exposed as a separate target, to ensure users can use local installations if necessary. This requires bumping the minimum version of tox to 3.2 so we can make use of the 'requires' config option [2]. [1] https://review.openstack.org/#/c/648399/ [2] https://tox.readthedocs.io/en/latest/config.html#conf-requires Change-Id: Ie848d409533b2a53523cd930299acf21ac10e13c Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* | Restore posargs when running stestrTobias Henkel2019-05-031-1/+1
| | | | | | | | | | | | | | The posargs got missing which removed the ability to customize test runs during local execution. Change-Id: Ic8687f817c83367c5da07a3d4444e96912569852
* | Merge "Halve stestr concurrency"Zuul2019-05-021-1/+1
|\ \
| * | Halve stestr concurrencyJames E. Blair2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | To see if reducing the concurrency of tests makes them more reliable, set them to half the number of cpus (by default, stestr uses the number of cpus). Change-Id: I7977c853b759cf980a6717a70876857ef7e9f77e
* | | Merge "Fix tox.ini cover target install command"Zuul2019-04-271-1/+0
|\ \ \ | |/ / |/| |
| * | Fix tox.ini cover target install commandClark Boylan2019-04-151-1/+0
| |/ | | | | | | | | | | | | | | | | The cover target wasn't working because the various ansible versions weren't getting installed. We can fix that by removing the custom pip install command for the cover target and instead rely on the default install command which handles this for us. Change-Id: Ieb7adce16356f0f080ceac580fbddab0d2dbc537
* | Update references for opendevMonty Taylor2019-04-241-1/+1
|/ | | | Change-Id: I3c1ac5478efed4dee1d525deb036d457287fa136
* tox: Fix indentationStephen Finucane2019-04-011-29/+44
| | | | | | | | Yes, this is purely stylistic and does screw up git log, but it's a heck of a lot easier to work with in this way. Change-Id: Ie20ad2fc62be83181826cbdad64ba951d43534e8 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* tox: Change default 'install_command'Stephen Finucane2019-04-011-16/+6
| | | | | | | | Means we don't need to set this for the default factors (py3x), meaning we get new versions for free going forward. Change-Id: Idba181e96adab16181a7f776093c9dfe33e071c6 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* tox: Remove 'commands_pre'Stephen Finucane2019-04-011-3/+0
| | | | | | | | | These were added in I5ce1385245c76818777aa34230786a9dbaf723e5 but are not necessary since I680777e5406368d35366602ac37e029db91c8a5c, the latter reverting most of the former. Removed them. Change-Id: Ic820ac288cc8b97b417ba9fa25328c30c99562a3 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
* Increase global test timeoutTobias Henkel2019-03-231-1/+1
| | | | | | | | The OS_TEST_TIMEOUT setting is used to create a TestTimeout fixture which aborts tests. This is currently set to 150s which is too low often for the test_plugin and test_playbook tests. Change-Id: Ic638dfdad513f3a61e4026c3667b1ca18d464fc9
* Add py37 environment to toxTobias Henkel2019-03-191-0/+3
| | | | | | | | On some newer distros like Fedora we need to be able to run tox with py37. For the py3* environments we need to use the pip wrapper so declare this as well. Change-Id: I666098238383ebc70982772dbeb449ab37b3b37c
* Move ansible installation from pre_command to install phase in toxTobias Henkel2019-03-191-2/+0
| | | | | | | | | | | | | | We currently install ansible during the pre_command phase in tox. This breaks the following use case: tox -e py36 --notest ttrun <test case> This is broken now because ttrun doesn't run pre_commands. Instead we already have a pip wrapper that does the nodeenv installation. We can use this to also call zuul-manage-ansible on zuul installation. Change-Id: I680777e5406368d35366602ac37e029db91c8a5c
* Run tox remote concurrentTobias Henkel2019-03-151-1/+1
| | | | | | | | Adding more ansible versions lead to longer runtimes so we need to either run those tests concurrently or split them per ansible version and run one job per ansible version. Change-Id: I41574d8f5c0f7f5fa2c5272044d6b387def5bfa7
* Manage ansible installations within zuulTobias Henkel2019-03-151-0/+5
| | | | | | | | | | | | | | | | | | | | | As a first step towards supporting multiple ansible versions we need tooling to manage ansible installations. This moves the installation of ansible from the requirements.txt into zuul. This is called as a setup hook to install the ansible versions into <prefix>/lib/zuul/ansible. Further this tooling abstracts knowledge that the executor must know in order to actually run the correct version of ansible. The actual usage of multiple ansible versions will be done in follow-ups. For better maintainability the ansible plugins live in zuul/ansible/base where plugins can be kept in different versions if necessary. For each supported ansible version there is a specific folder that symlinks the according plugins. Change-Id: I5ce1385245c76818777aa34230786a9dbaf723e5 Depends-On: https://review.openstack.org/623927
* Add ignore_basepython_conflict option to tox.iniMonty Taylor2018-11-061-1/+2
| | | | | | | | | Without this, basepython overrides the python in all envs, even the builtin ones. That means that py35 and py36 would both be testing with whatever the default python3 is on the system, not 3.5 and 3.6 specifically. Change-Id: I1af5bd99934638244ea29375fc4f170e5616f01b
* Merge "Use doc/requirements.txt"Zuul2018-10-291-0/+2
|\
| * Use doc/requirements.txtAndreas Jaeger2018-10-281-0/+2
| | | | | | | | | | | | | | Create separate doc/requirements.txt file and use it, this shrinks the list of requirements to install for a normal run. Change-Id: I7c27f7f737657005ab6e370ae7e5dceb5a7073e7
* | Fix flake 3.6.0 warningsAndreas Jaeger2018-10-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | flake 3.6.0 introduces a couple of new tests, handle them in the zuul base: * Disable "W504 line break after binary operator", this is a new warning with different coding style. * Fix "F841 local variable 'e' is assigned to but never used" * Fix "W605 invalid escape sequence" - use raw strings for regexes. * Fix "F901 'raise NotImplemented' should be 'raise NotImplementedError'" * Ignore "E252 missing whitespace around parameter equals" since it reports on parameters like: def makeNewJobs(self, old_job, parent: Job=None): Change "flake8: noqa" to "noqa" since "flake8: noqa" is a file level noqa and gets ignored with flake 3.6.0 if it's not at beginning of line - this results in many warnings for files ./zuul/driver/bubblewrap/__init__.py and ./zuul/cmd/migrate.py. Fix any issues there. Change-Id: Ia79bbc8ac0cd8e4819f61bda0091f4398464c5dc
* Update docs build jobAndreas Jaeger2018-08-221-1/+1
| | | | | | | | | | | Use tox -e docs for building with the new build-tox-docs template. Remove the irrelevant files list for docs building, these files are obsolete, we don't need to special case them anymore. Enable warnings as error when building in tox.ini. Depends-On: https://review.openstack.org/594802 Change-Id: I436dc438677e32d044b79d797f95cdf68152d538
* Fix tox-coverTobias Henkel2018-06-101-0/+1
| | | | | | | The tox-cover environment is broken since the switch to stestr. Fix that like it is done in shade. Change-Id: I1e6ccf9f3c7c1352caa39a60646ec2e768dfbb71
* Support databases on other hosts during testsTobias Henkel2018-05-251-1/+8
| | | | | | | | | | In some setups (e.g. docker based) the test databases are not on localhost. Allow overriding this like it is done for other zk hosts. Also don't create test accounts with unencrypted passwords. This is no longer supported in recent postgres versions. Change-Id: I22ad29b31c7c51c117543eb05c3bfc0f5555562c
* Revert "Revert "Switch to stestr""James E. Blair2018-05-171-9/+14
| | | | | | This reverts commit e56801f2e8a04f08813125b05a4ff8c983beddbd. Change-Id: Icbea5ddd744d1fa65a397fb613731315687f9803
* Use nodeenv for npm and yarn in toxMonty Taylor2018-04-121-0/+13
| | | | | | | | | | | | | | | | Add a wrapper installation script that will install npm and yarn into the current virtualenv. If yarn is installed globally, the script is a no-op. If yarn is not installed globally, whenever tox thinks it needs to create or re-create a virtualenv, install nodeenv then use it to install yarn. This removes the use of the zuul-tox-py35 job because it should now just work properly with the normal job. It does not remove the job itself because it's still used in tox-py35-on-zuul. Change-Id: If360a3f0c6b3d74498f8aa063d8b1ae87daff101
* Allow external zookeeper in tox py35 runsTobias Henkel2018-03-211-1/+1
| | | | | | | | | During local testing some people run zookeeper in a docker container or even on a different host (e.g. docker on mac). The tests themselves support that but for running them within tox we need to pass the NODEPOOL_ZK_HOST variable. Change-Id: Iac510bd71be7fda2407032dcd6fc41c5aa6f04cf
* Revert "Switch to stestr"James E. Blair2018-03-211-15/+9
| | | | | | | | | | There are several differences between this and testr which we need to discuss. Let's wait until after the v3 release so we don't delay it further. This reverts commit 68e02466ce13a5dbc01ada10b2704701544717dd. Change-Id: I873145c15fd88fe752cb987d0892c146c35041d8