add flake8 extra plugins #1442
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [main, opensuse] | |
pull_request: | |
branches: [main, opensuse] | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
build-type: ['normal'] | |
container: | |
- 'registry.fedoraproject.org/fedora:latest' | |
- 'registry.fedoraproject.org/fedora:rawhide' | |
- 'registry.opensuse.org/opensuse/tumbleweed:latest' | |
include: | |
- container: 'registry.fedoraproject.org/fedora:latest' | |
build-type: 'no-optional-deps' | |
- container: 'registry.opensuse.org/opensuse/tumbleweed:latest' | |
build-type: 'no-optional-deps' | |
fail-fast: false | |
container: | |
image: ${{ matrix.container }} | |
steps: | |
- run: zypper -n install | |
cpio gzip | |
bzip2 xz | |
binutils glibc glibc-32bit glibc-locale | |
python3-python-magic | |
python3-rpm | |
python3-base | |
python3-setuptools | |
python3-pybeam | |
python3-pytest | |
python3-pytest-cov | |
python3-pytest-xdist | |
python3-flake8 | |
python3-flake8-builtins | |
python3-flake8-bugbear | |
python3-flake8-import-order | |
python3-flake8-quotes | |
python3-pyxdg | |
python3-zstandard | |
python3-tomli | |
python3-tomli-w | |
python3-pip | |
rpm-build | |
git | |
if: ${{ contains(matrix.container, 'opensuse') }} | |
- run: zypper -n install | |
checkbashisms dash | |
desktop-file-utils | |
appstream-glib | |
myspell-en_US myspell-cs_CZ | |
myspell-fr_FR | |
python3-pyenchant | |
if: ${{ contains(matrix.container, 'opensuse') && matrix.build-type == 'normal' }} | |
- run: zypper -n install python3-flake8-comprehensions | |
if: ${{ contains(matrix.container, 'opensuse') }} | |
- run: dnf --nogpgcheck --assumeyes install | |
/usr/bin/cpio | |
/usr/bin/bzip2 | |
/usr/bin/python3 | |
/usr/bin/readelf | |
/usr/bin/ldd | |
/usr/bin/c++filt | |
/usr/bin/xz | |
glibc | |
glibc.i686 | |
python3-setuptools | |
python3-magic | |
python3-rpm | |
python3-pybeam | |
python3-pytest | |
python3-pytest-cov | |
python3-pytest-xdist | |
python3-flake8 | |
python3-flake8-builtins | |
python3-flake8-import-order | |
python3-flake8-quotes | |
python3-pyxdg | |
python3-tomli-w | |
python3-zstandard | |
python3-pip | |
rpm-build | |
git | |
if: ${{ contains(matrix.container, 'fedora') }} | |
- run: dnf --assumeyes install | |
python3-tomli | |
if: ${{ contains(matrix.container, 'fedora') && ! contains(matrix.container, 'rawhide') }} | |
- run: dnf --nogpgcheck --assumeyes install | |
/usr/bin/appstream-util | |
/usr/bin/desktop-file-validate | |
dash | |
devscripts-checkbashisms | |
hunspell-en | |
hunspell-cs | |
hunspell-fr | |
python3-enchant | |
if: ${{ contains(matrix.container, 'fedora') && matrix.build-type == 'normal' }} | |
- run: rm -rf $(rpm --eval '%_dbpath') | |
if: matrix.build-type == 'no-optional-deps' | |
- run: pip install coveralls pyupgrade ruff | |
- uses: actions/checkout@v3 | |
- run: pytest | |
- run: flake8 | |
- run: ruff . | |
- run: find . -name '*.py' | xargs pyupgrade --py38-plus | |
- run: python3 -m cProfile -o profile.stats lint.py -V test/source/* test/binary/* > /dev/null | |
- run: python3 test/dump_stats.py profile.stats | |
- name: Collect the coveralls report | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls | |
if: github.event_name != 'pull_request' |