Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/837639 )

Change subject: [tests] use pytest for doctest at github
......................................................................

[tests] use pytest for doctest at github

Use pytest instead of doctest with github actions.
This also solves several issues
- pytest runs with Python 3.10+
- pytest runs with pypy

Bug: T319164
Change-Id: I33cd6169aeb39bc138cb500f65f8987ecd2041ac
---
M .github/workflows/doctest.yml
1 file changed, 9 insertions(+), 12 deletions(-)

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



diff --git a/.github/workflows/doctest.yml b/.github/workflows/doctest.yml
index 019b4e2..1afe6c9 100644
--- a/.github/workflows/doctest.yml
+++ b/.github/workflows/doctest.yml
@@ -16,18 +16,15 @@
 jobs:
   build:
     runs-on: ${{ matrix.os }}
-    timeout-minutes: 5
+    timeout-minutes: 15

     strategy:
       fail-fast: false
-      max-parallel: 3
+      max-parallel: 6

       matrix:
-        python-version: ["3.6", "3.9"]
-        os: [ "ubuntu-latest", "macOS-latest" ]
-        include:
-          - python-version: "pypy3"
-            os: "ubuntu-latest"
+        os: [ "windows-latest", "macOS-latest", "ubuntu-latest" ]
+        python-version: ["pypy3.7", "3.11.0-dev - 3.11", "3.6" ]

     steps:
     - uses: actions/checkout@v3
@@ -44,7 +41,7 @@
         python -m pip install --upgrade pip
         pip --version
         pip install -U setuptools
-        pip install nose
+        pip install pytest
         pip install "sseclient<0.0.23,>=0.0.18"
         pip install "mwparserfromhell>=0.5.0"
         pip install "PyMySQL >= 0.9.3"
@@ -56,11 +53,11 @@
       run: |
         python -Werror::UserWarning -m pwb generate_user_files 
-site:wikipedia:test -user:${{ env.PYWIKIBOT_USERNAME }} -v -debug;

-    - name: doctest with nose
-      timeout-minutes: 3
+    - name: doctest with pytest
+      timeout-minutes: 10
       run: |
         python pwb.py version
-        nosetests --version
-        nosetests -v --with-doctest --with-coverage pywikibot 
--ignore-files="(gui|memento)\.py"
+        pytest --version
+        coverage run -m pytest pywikibot --doctest-modules 
--ignore-glob="*gui.py" --ignore-glob="*memento.py"
     - name: Upload coverage to Codecov
       run: codecov

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/837639
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I33cd6169aeb39bc138cb500f65f8987ecd2041ac
Gerrit-Change-Number: 837639
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to