Skip to content

tests: remove unmaintained flake8-mock(-x2) #169

tests: remove unmaintained flake8-mock(-x2)

tests: remove unmaintained flake8-mock(-x2) #169

Workflow file for this run

---
# Run GraalPy tests with a variety of GraalPy versions and os
name: GraalPy Tests
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' }}
continue-on-error: ${{ matrix.experimental || false }}
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
python-version: [graalpy-24.1, graalpy-25.0]
site: ['wikipedia:test']
os: ['macOS-latest', 'ubuntu-latest']
experimental: [True]
steps:
- name: Checkout Repository
uses: actions/checkout@v6
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: ${{ endsWith(matrix.python-version, '-dev') }}
- name: Install dependencies
run: |
pip --version
pip install beautifulsoup4
pip install mwparserfromhell
pip install packaging
pip install requests
pip install wikitextparser
pip install pytest
pip install pytest-attrib
pip install coverage
- name: Generate user files
run: |
python -Werror::UserWarning -m pwb generate_user_files -site:${{matrix.site}} -v -debug;
- name: Test with pytest
id: ci_test
continue-on-error: true
timeout-minutes: 25
env:
PYTHONIOENCODING: utf-8
PYWIKIBOT_TEST_NO_RC: 1
run: |
python pwb.py version
if [[ "${{ matrix.python-version }}" == "graalpy-25.0" && "${{ matrix.os }}" == "ubuntu-latest" ]]; then
echo "Running tests without coverage"
pytest -k "not TestDate" -a "not net" --ignore=tests/script_tests.py
else
echo "Running tests with coverage"
coverage run -m pytest -k "not TestDate" -a "not net" --ignore=tests/script_tests.py
fi
- name: Show coverage statistics
run: |
coverage combine || true
coverage report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Check on failure
if: steps.ci_test.outcome == 'failure'
run: |
# Print public IP of runner
curl -s https://api.ipify.org
exit 1