Skip to content

Merge "[IMPR] Refactor xmlreader" #873

Merge "[IMPR] Refactor xmlreader"

Merge "[IMPR] Refactor xmlreader" #873

Workflow file for this run

name: Doctest CI
# Run Pywikibot doctests with a variety of Python versions
on:
push:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PYWIKIBOT_TEST_RUNNING: 1
PYWIKIBOT_USERNAME: Pywikibot-test
jobs:
build:
runs-on: ${{ matrix.os || 'ubuntu-latest'}}
timeout-minutes: 10
strategy:
fail-fast: false
max-parallel: 7
matrix:
os: [ "windows-latest", "macOS-latest", "ubuntu-latest" ]
python-version: ["pypy3.7", "3.7", "3.11", "3.12"]
include:
- python-version: "3.13-dev"
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
if: ${{ matrix.python-version != '3.13-dev' }}
with:
python-version: ${{ matrix.python-version }}
# use deadsnakes/action until actions/setup-python supports Python 3.13
- name: Set up development Python ${{ matrix.python-version }}
uses: deadsnakes/action@v3.0.1
if: ${{ matrix.python-version == '3.13-dev' }}
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip --version
pip install coverage
pip install "importlib_metadata ; python_version < '3.8'"
pip install mwparserfromhell
pip install packaging
pip install "PyMySQL >= 1.0.0"
pip install pytest
pip install -U setuptools
pip install "sseclient<0.0.23,>=0.0.18"
python -c "import setuptools; print('setuptools:', setuptools.__version__)"
- name: Generate user files
run: |
python -Werror::UserWarning -m pwb generate_user_files -site:wikipedia:test -user:${{ env.PYWIKIBOT_USERNAME }} -v -debug;
- name: doctest with pytest
timeout-minutes: 5
run: |
python pwb.py version
pytest --version
coverage run -m pytest pywikibot --doctest-modules --ignore-glob="*gui.py" --ignore-glob="*memento.py"
- name: Show coverage statistics
run: |
coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3