forked from wikimedia/pywikibot
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] Move Pywikibot tests from Appveyor to Github action
Solely Python 3.7.0 tests are tested on Appveyor because they aren't avaliable at GitHub Bug: T368192 Change-Id: If84db61a00aa2f57b0898b38d4afe69870206246
- Loading branch information
Showing
2 changed files
with
12 additions
and
48 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,6 @@ name: Windows Tests | |
|
||
on: | ||
push: | ||
branches: [ master, stable ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
concurrency: | ||
|
@@ -17,7 +15,7 @@ env: | |
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os || 'windows-latest' }} | ||
runs-on: "windows-latest" | ||
continue-on-error: ${{ matrix.experimental || false }} | ||
timeout-minutes: 100 | ||
|
||
|
@@ -26,7 +24,7 @@ jobs: | |
max-parallel: 10 | ||
|
||
matrix: | ||
python-version: [ "3.7.0", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0" ] | ||
python-version: [ "3.7.1", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13.0-alpha - 3.13.0" ] | ||
python-arch: [ x64, x86 ] | ||
site: [ "wikipedia:en" ] | ||
experimental: [ true ] | ||
|
@@ -39,15 +37,6 @@ jobs: | |
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
if: "!endsWith(matrix.python-version, '-dev')" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: ${{ matrix.python-arch }} | ||
|
||
# use deadsnakes/action for development releases | ||
- name: Set up development Python ${{ matrix.python-version }} | ||
uses: deadsnakes/[email protected] | ||
if: "endsWith(matrix.python-version, '-dev')" | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: ${{ matrix.python-arch }} | ||
|
@@ -59,30 +48,27 @@ jobs: | |
python -c "import struct; print('PYTHON_ARCH:', struct.calcsize('P') << 3)" | ||
python -m pip install --upgrade pip | ||
pip --version | ||
if [ ${{matrix.python-version}} == '3.7.0' ]; then pip install "urllib3<2.0"; fi | ||
if [ ${{matrix.python-version}} == '3.7.0' ]; then pip install -U setuptools; fi | ||
if [ ${{matrix.python-version}} >= '3.12' ]; then pip install -U setuptools; fi | ||
if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
pip install -r dev-requirements.txt | ||
pip install -r requirements.txt | ||
pip install wikitextparser | ||
- name: Generate user files | ||
run: | | ||
python -Werror::UserWarning -m pwb generate_user_files -site:${{matrix.site}} -user:${{ env.PYWIKIBOT_USERNAME }} -v -debug; | ||
echo "usernames['wikipedia']['en'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py | ||
echo "usernames['wikisource']['zh'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py | ||
echo "usernames['wikipedia']['test'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py | ||
echo "usernames['wikidata']['test'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py | ||
echo "usernames['commons']['commons'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py | ||
echo "usernames['meta']['meta'] = '${{ env.PYWIKIBOT_USERNAME }}'" >> user-config.py | ||
echo "noisysleep = float('inf')" >> user-config.py | ||
echo "maximum_GET_length = 5000" >> user-config.py | ||
echo "transliteration_target = None" >> user-config.py | ||
echo "console_encoding = 'utf8'" >> user-config.py | ||
echo "import os" >> user-config.py | ||
echo "password_file = os.path.expanduser('passwordfile')" >> user-config.py | ||
echo "('${{ env.PYWIKIBOT_USERNAME }}', '${{ secrets.PYWIKIBOT_USERPWD }}')" > passwordfile | ||
- name: Test with unittest or pytest | ||
- name: Test with unittest | ||
id: ci_test | ||
continue-on-error: true | ||
timeout-minutes: 90 | ||
|