[doc] update ROADMAP.rst and CHANGELOG.rst #30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sysop write test CI | |
# Run Pywikibot write tests on test wiki using sysop rights | |
on: | |
push: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
PYWIKIBOT_TEST_RUNNING: 1 | |
PYWIKIBOT_USERNAME: Pywikibot-oauth | |
jobs: | |
build: | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
continue-on-error: ${{ matrix.experimental || false }} | |
timeout-minutes: 100 | |
strategy: | |
fail-fast: false | |
max-parallel: 1 | |
matrix: | |
python-version: ["3.7"] | |
family: ['wikipedia'] | |
code: ['test'] | |
domain: ['test.wikipedia.org'] | |
experimental: [true] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get token name | |
env: | |
_oauth_token: OAUTH_TOKEN_${{ matrix.family }}_${{ matrix.code }} | |
uses: ASzc/change-string-case-action@v5 | |
id: token | |
with: | |
string: ${{ env._oauth_token }} | |
- name: Split OAuth Token | |
uses: jungwinter/split@v2 | |
id: split | |
with: | |
msg: ${{ secrets[format('{0}', steps.token.outputs.uppercase)] }} | |
separator: ":" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip --version | |
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Generate user files | |
run: | | |
python -Werror::UserWarning -m pwb generate_user_files -family:${{matrix.family}} -lang:${{matrix.code}} -user:${{ env.PYWIKIBOT_USERNAME }} -v -debug; | |
echo "authenticate['${{ matrix.domain }}'] = ('${{ steps.split.outputs._0 }}', '${{ steps.split.outputs._1 }}', '${{ steps.split.outputs._2 }}', '${{ steps.split.outputs._3 }}')" >> user-config.py | |
echo "usernames['wikipedia']['test'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py | |
echo "max_retries = 3" >> user-config.py | |
echo "noisysleep = float('inf')" >> user-config.py | |
echo "maximum_GET_length = 5000" >> user-config.py | |
echo "console_encoding = 'utf8'" >> user-config.py | |
- name: Sysop and write tests with pytest | |
id: ci_test | |
continue-on-error: true | |
timeout-minutes: 90 | |
env: | |
PYWIKIBOT_TEST_OAUTH: ${{ secrets[format('{0}', steps.token.outputs.uppercase)] }} | |
PYWIKIBOT_TEST_WRITE: ${{ matrix.domain == 'test.wikipedia.org' && 1 || 0}} | |
run: | | |
python pwb.py version | |
pytest -s -r A -a "rights or write" --cov=.; | |
- name: Show coverage statistics | |
run: | | |
coverage report | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- name: Check on failure | |
if: steps.ci_test.outcome == 'failure' | |
run: exit 1 |