Skip to content

Bump flake8 to 7.3.0 + fix linting issues #269

Bump flake8 to 7.3.0 + fix linting issues

Bump flake8 to 7.3.0 + fix linting issues #269

Workflow file for this run

name: Tests
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Do both in one job run so we only need to install python3-uno once
# (as that is fairly expensive)
python-tests-and-coverage:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install Python uno module (LibreOffice UNO Bridge)
run: |
sudo apt update
sudo apt-get install python3-uno
- name: Install python packages
run: pip install -r requirements.txt
- name: Run all tests
run: python -X dev -m unittest discover -s pywikitools/test
- name: Generate coverage report
run: |
coverage run --source=pywikitools/,pywikitools/correctbot/ --omit=pywikitools/user-config.py -m unittest discover -s pywikitools/test
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
python-code-quality:
# Run flake8 for linting
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install python packages
run: pip install -r requirements.txt
- name: Run flake8
run: flake8 .