jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/i18n/+/703218 )
Change subject: [tests] Add tox.ini to use Jenkins for i18n-tests ......................................................................
[tests] Add tox.ini to use Jenkins for i18n-tests
Bug: T286207 Change-Id: I65ad6c5d7691ba59c3283d02baae5c6ae21402ce --- A run-tests.sh A tox.ini 2 files changed, 36 insertions(+), 0 deletions(-)
Approvals: Legoktm: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/run-tests.sh b/run-tests.sh new file mode 100755 index 0000000..2941b01 --- /dev/null +++ b/run-tests.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -euxo pipefail + +git clone https://github.com/wikimedia/pywikibot $1/pywikibot-build --depth 1 +mkdir -p $1/pywikibot-build/scripts/i18n +touch $1/pywikibot-build/scripts/i18n/__init__.py +for item in *; do + if [[ -d "$item" ]]; then + cp -rp "$item" $1/pywikibot-build/scripts/i18n; + fi; +done + +cd $1/pywikibot-build +python -m unittest -v tests/l10n_tests.py diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..054bd24 --- /dev/null +++ b/tox.ini @@ -0,0 +1,22 @@ +[tox] +# minversion = 1.7.2 needed for skip_missing_interpreters +minversion = 1.7.2 + +# Do not run install command +skipsdist = True +skip_missing_interpreters = True + +# Environments to execute when invoking 'tox' +envlist = py37 + +[testenv] +setenv = + VIRTUAL_ENV={envdir} + PYWIKIBOT_NO_USER_CONFIG=2 + +commands = ./run-tests.sh {envtmpdir} + +deps = + requests + wikitextparser +allowlist_externals = *
pywikibot-commits@lists.wikimedia.org