jenkins-bot has submitted this change and it was merged.

Change subject: pywikibot/core test job
......................................................................


pywikibot/core test job

Craft a basic configuration file for pywikibot and invoke the test suite
via: python setup.py test

Hacks:
  - setup.py bdist the bundled httplib2, then set up PYTHONPATH to include
    externals/httplib2/python2
  - run setup.py test with http_proxy=nowhere to prevent setup.py
    from installing any dependencies from the internet

Change-Id: If1cce619137a956848f6bda27f54f2232197dad9
---
M pywikibot.yaml
1 file changed, 35 insertions(+), 0 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot.yaml b/pywikibot.yaml
index 0330aaf..b1fe210 100644
--- a/pywikibot.yaml
+++ b/pywikibot.yaml
@@ -1,3 +1,37 @@
+# Template used to run the pywikibot/core test suite via
+#   python setup.py test
+- job-template:
+    name: 'pywikibot-core-tests'
+    node: hasContintPackages
+    defaults: use-remote-zuul
+
+    triggers:
+     - zuul
+
+    builders:
+    # Zuul uses Python str.format(obj) for {config} substitutions
+    # Escape as {foo} as {{key}} to avoid triggering a KeyError in Zuul parser
+     - shell: |
+        #!/bin/bash
+        cd externals/httplib2
+        python setup.py bdist
+        cd ../..
+        #
+        export PYTHONPATH=`pwd`/externals/httplib2/python2
+        export PYWIKIBOT2_DIR=`pwd`
+        cat > user-config.py << EOF
+        mylang = 'en'
+        family = 'wikipedia'
+        usernames['wikipedia']['en'] = 'Pywikibot-test'
+        password_file = 'passwordfile'
+        EOF
+        #
+        cat > passwordfile << EOF
+        ('Pywikibot-test', '...password...')
+        EOF
+        # hack to make sure we do not download dependencies from pip
+        http_proxy=nowhere https_proxy=nowhere python setup.py test
+
 - project:
     name: pywikibot-compat
 
@@ -9,6 +43,7 @@
 
     jobs:
      - python-jobs
+     - pywikibot-core-tests
 
 - project:
     name: pywikibot-i18n

-- 
To view, visit https://gerrit.wikimedia.org/r/81287
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If1cce619137a956848f6bda27f54f2232197dad9
Gerrit-PatchSet: 13
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to