1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
name: CI
on:
push:
branches: [main, opensuse, 'opensuse-slfo-*']
pull_request:
branches: [main, opensuse, 'opensuse-slfo-*']
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
python3-pipx
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
pipx
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: pipx install coveralls
- run: pipx install pyupgrade
- run: pipx install ruff
- uses: actions/checkout@v3
- run: pytest
- run: flake8
- run: /github/home/.local/bin/ruff check .
- run: find . -not -path "./test/files/*" -name '*.py' | xargs /github/home/.local/bin/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: /github/home/.local/bin/coveralls
if: github.event_name != 'pull_request'
|