From eaf65f22576458df9e4ac3f44cd86bb4d7185dfe Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 14:47:36 +0200 Subject: [PATCH 01/14] linters-plugins --- .github/workflows/build-install.yaml | 122 --------------------------- .github/workflows/linters.yaml | 76 +++++++++++++++++ .github/workflows/unittests.yaml | 93 -------------------- 3 files changed, 76 insertions(+), 215 deletions(-) delete mode 100644 .github/workflows/build-install.yaml create mode 100644 .github/workflows/linters.yaml delete mode 100644 .github/workflows/unittests.yaml diff --git a/.github/workflows/build-install.yaml b/.github/workflows/build-install.yaml deleted file mode 100644 index 22fb04f09d..0000000000 --- a/.github/workflows/build-install.yaml +++ /dev/null @@ -1,122 +0,0 @@ -name: 'build and installation tests' - -on: - push: - branches: ['master'] - paths-ignore: - - 'AUTHORS' - - 'COPYING' - - 'NEWS' - - 'README.md' - - 'doc/**' - pull_request: - branches: ['master'] - paths-ignore: - - 'AUTHORS' - - 'COPYING' - - 'NEWS' - - 'README.md' - - 'doc/**' - -jobs: - rpmbuild: - name: 'rpmbuild test' - runs-on: 'ubuntu-latest' - strategy: - fail-fast: false - matrix: - # Testing per python-version using actions/setup-python is not possible, - # because rpm doesn't exist on pypi and cannot be installed via pip on ubuntu. - # That's why we're going to test on the target distros directly. - container: - - # Fedora - - 'fedora:36' - - 'fedora:rawhide' - - # OpenSUSE - # leap < 15.2 doesn't contain git-lfs which causes actions/checkout to fail - - 'opensuse/leap:15.3' - - 'opensuse/leap:15.4' - - 'opensuse/tumbleweed' - - # CentOS Stream - - 'quay.io/centos/centos:stream9' - - container: - image: ${{ matrix.container }} - - steps: - - name: 'Install packages (OpenSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} - run: | - zypper --non-interactive --gpg-auto-import-keys refresh - zypper --non-interactive dist-upgrade - zypper --non-interactive install git-lfs rpm-build - - - name: 'Install packages (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} - run: | - dnf -y makecache - dnf -y distro-sync - dnf -y install git-lfs rpm-build dnf-plugins-core - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: 'Install build dependencies (OpenSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} - run: | - zypper --non-interactive install $(rpmspec -q --buildrequires contrib/osc.spec) - - - name: 'Install build dependencies (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} - run: | - dnf -y builddep contrib/osc.spec - - - name: 'Build SRPM and RPMs' - run: | - git config --global --add safe.directory "$(pwd)" - - git remote add upstream https://github.com/openSUSE/osc.git - git fetch upstream --tags --force - - ./contrib/build_rpm.py --srpm --rpm - - - name: 'Install built RPMs (OpenSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} - run: | - zypper --non-interactive install --force --allow-vendor-change --allow-unsigned-rpm ./contrib/*/*.rpm - - - name: 'Install build RPMs (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} - run: | - dnf -y install ./contrib/*/*.rpm - - - name: 'Run installed osc' - run: | - osc --help - - pip: - name: 'pip install test' - runs-on: 'ubuntu-latest' - strategy: - fail-fast: false - - steps: - - name: 'Install packages' - run: | - sudo apt-get -y update - sudo apt-get -y upgrade - sudo apt-get -y --no-install-recommends install git python3-pip python3-rpm - - - uses: actions/checkout@v3 - - - name: 'Install osc from pip' - run: | - pip3 install . - - - name: 'Run installed osc' - run: | - osc --help diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml new file mode 100644 index 0000000000..de9533a285 --- /dev/null +++ b/.github/workflows/linters.yaml @@ -0,0 +1,76 @@ +name: 'linters' + +on: + push: + branches: ['master'] + paths: + - '.github/**' + - '**.py' + - 'tests/**' + pull_request: + branches: ['master'] + paths: + - '.github/**' + - '**.py' + - 'tests/**' + +jobs: + pylint_plugins: + name: 'run pylint on plugins' + runs-on: 'ubuntu-latest' + strategy: + fail-fast: false + + steps: + - name: 'Install packages' + run: | + apt-get -y update + apt-get -y upgrade + apt-get -y --no-install-recommends install diffutils pylint + + - uses: actions/checkout@v3 + + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + path: osc-master + + - uses: actions/checkout@v3 + with: + repository: openSUSE/osc-plugin-collab + + - uses: actions/checkout@v3 + with: + repository: openSUSE/osc-plugin-install + + - uses: actions/checkout@v3 + with: + repository: openSUSE/openSUSE-release-tools + + - uses: actions/checkout@v3 + with: + repository: openSUSE/osc-plugin-overview + + - uses: actions/checkout@v3 + with: + repository: openSUSE/osc-plugin-qam + + - name: 'Check osc-plugin-collab' + run: | + pushd osc-plugin-collab + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args + find -maxdepth 1 -name '*.py' >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log + PYTHONPATH=".." pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + diff pylint-osc-master.log pylint-osc-pr.log + popd + + - name: 'Check openSUSE-release-tools' + run: | + pushd openSUSE-release-tools + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args + find -maxdepth 1 -name '*.py' >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log + PYTHONPATH=".." pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + diff pylint-osc-master.log pylint-osc-pr.log + popd diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml deleted file mode 100644 index 8767ec2722..0000000000 --- a/.github/workflows/unittests.yaml +++ /dev/null @@ -1,93 +0,0 @@ -name: 'unit tests' - -on: - push: - branches: ['master'] - paths: - - '.github/**' - - '**.py' - - 'tests/**' - pull_request: - branches: ['master'] - paths: - - '.github/**' - - '**.py' - - 'tests/**' - -jobs: - test: - name: 'unit tests' - runs-on: 'ubuntu-latest' - strategy: - fail-fast: false - matrix: - # Testing per python-version using actions/setup-python is not possible, - # because rpm doesn't exist on pypi and cannot be installed via pip on ubuntu. - # That's why we're going to test on the target distros directly. - container: - - # Fedora - - 'fedora:36' - - 'fedora:rawhide' - - # openSUSE - # leap < 15.2 doesn't contain git-lfs which causes actions/checkout to fail - - 'opensuse/leap:15.3' - - 'opensuse/leap:15.4' - - 'opensuse/tumbleweed' - - # CentOS Stream - - 'quay.io/centos/centos:stream9' - - # Debian - - 'debian:stable' - - 'debian:unstable' - - # Ubuntu - - 'ubuntu:latest' - - container: - image: ${{ matrix.container }} - - steps: - - name: 'Install packages (openSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} - run: | - zypper -n --gpg-auto-import-keys refresh - zypper -n lr --details - grep -qi tumbleweed /etc/os-release && zypper -n dist-upgrade || zypper -n patch || zypper -n patch - zypper -n install git-lfs - zypper -n install diffstat diffutils python3 python3-cryptography python3-pip python3-rpm python3-setuptools python3-urllib3 - - - name: 'Install packages (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} - run: | - dnf -y makecache - dnf -y distro-sync - dnf -y install git-lfs - dnf -y install diffstat diffutils python3 python3-cryptography python3-pip python3-rpm python3-setuptools python3-urllib3 - - - name: 'Install packages (Debian/Ubuntu)' - if: ${{ startsWith(matrix.container, 'debian:') || startsWith(matrix.container, 'ubuntu:') }} - run: | - apt-get -y update - apt-get -y upgrade - apt-get -y --no-install-recommends install git-lfs - apt-get -y --no-install-recommends install diffstat diffutils python3 python3-cryptography python3-pip python3-rpm python3-setuptools python3-urllib3 - - - uses: actions/checkout@v3 - - - name: 'Run unit tests' - run: | - pip3 install -e . - python3 setup.py test - - - name: 'Generate coverage reports (openSUSE Tumbleweed)' - if: ${{ matrix.container == 'opensuse/tumbleweed' }} - run: | - zypper -n install python3-pytest python3-pytest-cov - pytest --cov=osc - - - name: 'Upload coverage reports to Codecov (openSUSE Tumbleweed)' - if: ${{ matrix.container == 'opensuse/tumbleweed' }} - uses: codecov/codecov-action@v3 From 12af5a26c7048869af6e1c9fb0e895e5776282c4 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 14:48:23 +0200 Subject: [PATCH 02/14] linters-plugins --- .github/workflows/linters.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index de9533a285..b98f093b05 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -16,7 +16,7 @@ on: jobs: pylint_plugins: - name: 'run pylint on plugins' + name: 'run pylint on osc plugins' runs-on: 'ubuntu-latest' strategy: fail-fast: false @@ -24,9 +24,9 @@ jobs: steps: - name: 'Install packages' run: | - apt-get -y update - apt-get -y upgrade - apt-get -y --no-install-recommends install diffutils pylint + sudo apt-get -y update + sudo apt-get -y upgrade + sudo apt-get -y --no-install-recommends install diffutils pylint - uses: actions/checkout@v3 From 2b12e27d853a547d09bd935ed5cf0c8dc9b631c2 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 14:57:49 +0200 Subject: [PATCH 03/14] linters-plugins --- .github/workflows/linters.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index b98f093b05..c681f5707a 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -25,35 +25,49 @@ jobs: - name: 'Install packages' run: | sudo apt-get -y update - sudo apt-get -y upgrade + #sudo apt-get -y upgrade sudo apt-get -y --no-install-recommends install diffutils pylint - uses: actions/checkout@v3 + - name: 'find' + run: find + - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} path: osc-master + - name: 'find' + run: find + - uses: actions/checkout@v3 with: repository: openSUSE/osc-plugin-collab + path: osc-plugin-collab + + - name: 'find' + run: find - uses: actions/checkout@v3 with: repository: openSUSE/osc-plugin-install + path: osc-plugin-install - uses: actions/checkout@v3 with: repository: openSUSE/openSUSE-release-tools + path: openSUSE-release-tools - uses: actions/checkout@v3 with: repository: openSUSE/osc-plugin-overview + path: osc-plugin-overview - uses: actions/checkout@v3 with: repository: openSUSE/osc-plugin-qam + path: osc-plugin-qam - name: 'Check osc-plugin-collab' run: | From a907ff358d3ba2666cd78668d337c07229c1e3c2 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:09:06 +0200 Subject: [PATCH 04/14] linters-plugins --- .github/workflows/linters.yaml | 65 +++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index c681f5707a..df60f03a31 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -29,62 +29,85 @@ jobs: sudo apt-get -y --no-install-recommends install diffutils pylint - uses: actions/checkout@v3 - - - name: 'find' - run: find + with: + path: osc-pr - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} path: osc-master - - name: 'find' - run: find - - uses: actions/checkout@v3 with: repository: openSUSE/osc-plugin-collab path: osc-plugin-collab - - name: 'find' - run: find + - name: 'Check osc-plugin-collab' + run: | + pushd osc-plugin-collab + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args + find -maxdepth 1 -name '*.py' >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + diff -u pylint-osc-master.log pylint-osc-pr.log + popd - uses: actions/checkout@v3 with: repository: openSUSE/osc-plugin-install path: osc-plugin-install + - name: 'Check osc-plugin-install' + run: | + pushd osc-plugin-install + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args + find -maxdepth 1 -name '*.py' >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + diff -u pylint-osc-master.log pylint-osc-pr.log + popd + - uses: actions/checkout@v3 with: repository: openSUSE/openSUSE-release-tools path: openSUSE-release-tools + - name: 'Check openSUSE-release-tools' + run: | + pushd openSUSE-release-tools + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args + find -maxdepth 1 -name '*.py' >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + diff -u pylint-osc-master.log pylint-osc-pr.log + popd + - uses: actions/checkout@v3 with: repository: openSUSE/osc-plugin-overview path: osc-plugin-overview - - uses: actions/checkout@v3 - with: - repository: openSUSE/osc-plugin-qam - path: osc-plugin-qam - - - name: 'Check osc-plugin-collab' + - name: 'Check osc-plugin-overview' run: | - pushd osc-plugin-collab + pushd osc-plugin-overview find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log - PYTHONPATH=".." pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log - diff pylint-osc-master.log pylint-osc-pr.log + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + diff -u pylint-osc-master.log pylint-osc-pr.log popd - - name: 'Check openSUSE-release-tools' + - uses: actions/checkout@v3 + with: + repository: openSUSE/osc-plugin-qam + path: osc-plugin-qam + + - name: 'Check osc-plugin-qam' run: | - pushd openSUSE-release-tools + pushd osc-plugin-qam find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log - PYTHONPATH=".." pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log - diff pylint-osc-master.log pylint-osc-pr.log + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + diff -u pylint-osc-master.log pylint-osc-pr.log popd From 2f592abb4def9340bd7b9bbdd7925d336f1f2ad3 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:11:19 +0200 Subject: [PATCH 05/14] linters-plugins --- .github/workflows/linters.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index df60f03a31..b057e28cac 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -16,7 +16,7 @@ on: jobs: pylint_plugins: - name: 'run pylint on osc plugins' + name: 'diff pylint runs on osc plugins' runs-on: 'ubuntu-latest' strategy: fail-fast: false @@ -44,6 +44,8 @@ jobs: - name: 'Check osc-plugin-collab' run: | + pwd + find pushd osc-plugin-collab find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args From 217437895806c671d5facea6e5d48dc12f6ff256 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:16:19 +0200 Subject: [PATCH 06/14] linters-plugins --- .github/workflows/linters.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index b057e28cac..e0b4e6a198 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -46,13 +46,13 @@ jobs: run: | pwd find - pushd osc-plugin-collab + cd osc-plugin-collab find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log diff -u pylint-osc-master.log pylint-osc-pr.log - popd + cd .. - uses: actions/checkout@v3 with: From 83d6a2ed4987d4d602e5fb9c744af3cdc2dc46a9 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:20:11 +0200 Subject: [PATCH 07/14] linters-plugins --- .github/workflows/linters.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index e0b4e6a198..55c38aba23 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -44,6 +44,7 @@ jobs: - name: 'Check osc-plugin-collab' run: | + set -x pwd find cd osc-plugin-collab From d9cf636ab383abc5c711bcacb3645d2837351f98 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:22:04 +0200 Subject: [PATCH 08/14] linters-plugins --- .github/workflows/linters.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 55c38aba23..75cb3c6aa0 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -45,8 +45,8 @@ jobs: - name: 'Check osc-plugin-collab' run: | set -x - pwd - find + #pwd + #find cd osc-plugin-collab find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args From 3ebafacfe27e4539f9306eb0eb5d16567d55f862 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:28:41 +0200 Subject: [PATCH 09/14] linters-plugins --- .github/workflows/linters.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 75cb3c6aa0..4cf0da1539 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -50,8 +50,8 @@ jobs: cd osc-plugin-collab find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log cd .. @@ -65,8 +65,8 @@ jobs: pushd osc-plugin-install find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log popd @@ -80,8 +80,8 @@ jobs: pushd openSUSE-release-tools find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log popd @@ -95,8 +95,8 @@ jobs: pushd osc-plugin-overview find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log popd @@ -110,7 +110,7 @@ jobs: pushd osc-plugin-qam find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log popd From f70f56521d3603c098da644ceb481a1f4bae61c0 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:40:18 +0200 Subject: [PATCH 10/14] linters-plugins --- .github/workflows/linters.yaml | 40 +++++++++++++++------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 4cf0da1539..a11c632544 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -44,16 +44,12 @@ jobs: - name: 'Check osc-plugin-collab' run: | - set -x - #pwd - #find cd osc-plugin-collab - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args - find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args + find -maxdepth 1 -name '*.py' | sort >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log - cd .. - uses: actions/checkout@v3 with: @@ -63,10 +59,10 @@ jobs: - name: 'Check osc-plugin-install' run: | pushd osc-plugin-install - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args - find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args + find -maxdepth 1 -name '*.py' | sort >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log popd @@ -78,10 +74,10 @@ jobs: - name: 'Check openSUSE-release-tools' run: | pushd openSUSE-release-tools - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args - find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args + find -maxdepth 1 -name '*.py' | sort >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log popd @@ -93,10 +89,10 @@ jobs: - name: 'Check osc-plugin-overview' run: | pushd osc-plugin-overview - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args - find -maxdepth 1 -name '*.py' >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args + find -maxdepth 1 -name '*.py' | sort >> .pylint-args + PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : + PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log popd @@ -108,8 +104,8 @@ jobs: - name: 'Check osc-plugin-qam' run: | pushd osc-plugin-qam - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done > .pylint-args - find -maxdepth 1 -name '*.py' >> .pylint-args + find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args + find -maxdepth 1 -name '*.py' | sort >> .pylint-args PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log From 1fe475e990d4be6aa795c3542226aa6f0e7719da Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:47:09 +0200 Subject: [PATCH 11/14] linters-plugins --- .github/workflows/linters.yaml | 77 ++++++---------------------------- 1 file changed, 12 insertions(+), 65 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index a11c632544..29cd8ff08a 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -21,11 +21,18 @@ jobs: strategy: fail-fast: false + matrix: + plugin_repository: + - openSUSE/openSUSE-release-tools + - openSUSE/osc-plugin-collab + - openSUSE/osc-plugin-install + - openSUSE/osc-plugin-overview + - openSUSE/osc-plugin-qam + steps: - name: 'Install packages' run: | sudo apt-get -y update - #sudo apt-get -y upgrade sudo apt-get -y --no-install-recommends install diffutils pylint - uses: actions/checkout@v3 @@ -39,74 +46,14 @@ jobs: - uses: actions/checkout@v3 with: - repository: openSUSE/osc-plugin-collab - path: osc-plugin-collab - - - name: 'Check osc-plugin-collab' - run: | - cd osc-plugin-collab - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args - find -maxdepth 1 -name '*.py' | sort >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : - diff -u pylint-osc-master.log pylint-osc-pr.log - - - uses: actions/checkout@v3 - with: - repository: openSUSE/osc-plugin-install - path: osc-plugin-install + repository: ${{ matrix.plugin_repository }} + path: plugin - - name: 'Check osc-plugin-install' + - name: 'Diff pylint runs' run: | - pushd osc-plugin-install + cd plugin find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args find -maxdepth 1 -name '*.py' | sort >> .pylint-args PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : diff -u pylint-osc-master.log pylint-osc-pr.log - popd - - - uses: actions/checkout@v3 - with: - repository: openSUSE/openSUSE-release-tools - path: openSUSE-release-tools - - - name: 'Check openSUSE-release-tools' - run: | - pushd openSUSE-release-tools - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args - find -maxdepth 1 -name '*.py' | sort >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : - diff -u pylint-osc-master.log pylint-osc-pr.log - popd - - - uses: actions/checkout@v3 - with: - repository: openSUSE/osc-plugin-overview - path: osc-plugin-overview - - - name: 'Check osc-plugin-overview' - run: | - pushd osc-plugin-overview - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args - find -maxdepth 1 -name '*.py' | sort >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) | sort > pylint-osc-pr.log || : - diff -u pylint-osc-master.log pylint-osc-pr.log - popd - - - uses: actions/checkout@v3 - with: - repository: openSUSE/osc-plugin-qam - path: osc-plugin-qam - - - name: 'Check osc-plugin-qam' - run: | - pushd osc-plugin-qam - find -maxdepth 2 -name __init__.py | while read i; do dirname $i; done | sort > .pylint-args - find -maxdepth 1 -name '*.py' | sort >> .pylint-args - PYTHONPATH="../osc-master" pylint --errors-only $(cat .pylint-args) > pylint-osc-master.log || : - PYTHONPATH="../osc-pr" pylint --errors-only $(cat .pylint-args) > pylint-osc-pr.log || : - diff -u pylint-osc-master.log pylint-osc-pr.log - popd From dccd938f0ea4f75687f320d4d97ecc5655b1353f Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:47:42 +0200 Subject: [PATCH 12/14] linters-plugins --- .github/workflows/linters.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 29cd8ff08a..055539f769 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -20,14 +20,13 @@ jobs: runs-on: 'ubuntu-latest' strategy: fail-fast: false - - matrix: - plugin_repository: - - openSUSE/openSUSE-release-tools - - openSUSE/osc-plugin-collab - - openSUSE/osc-plugin-install - - openSUSE/osc-plugin-overview - - openSUSE/osc-plugin-qam + matrix: + plugin_repository: + - openSUSE/openSUSE-release-tools + - openSUSE/osc-plugin-collab + - openSUSE/osc-plugin-install + - openSUSE/osc-plugin-overview + - openSUSE/osc-plugin-qam steps: - name: 'Install packages' From 4cd78fe00e71315727dd726121db935c45dbb2ea Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 15:50:31 +0200 Subject: [PATCH 13/14] ERROR: remove PUT --- osc/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osc/core.py b/osc/core.py index dc3eafe60b..4887466c3a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -45,7 +45,7 @@ from . import conf from . import meter from . import oscerr -from .connection import http_request, http_GET, http_POST, http_PUT, http_DELETE +from .connection import http_request, http_GET, http_POST, http_DELETE from .store import Store from .util.helper import decode_list, decode_it, raw_input, _html_escape From 7c5537a19f1c85759b02f979fdf5f2d4fd6fc584 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Wed, 26 Oct 2022 16:01:16 +0200 Subject: [PATCH 14/14] fix-gha --- .github/workflows/linters.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml index 055539f769..14fa0ee20d 100644 --- a/.github/workflows/linters.yaml +++ b/.github/workflows/linters.yaml @@ -40,7 +40,7 @@ jobs: - uses: actions/checkout@v3 with: - ref: ${{ github.event.pull_request.head.sha }} + ref: ${{ github.event.pull_request.base.sha }} path: osc-master - uses: actions/checkout@v3