1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36:13 +01:00

Merge pull request #1214 from dmach/linters-print-pylint-logs

GHA: Print pylint logs before diffing them
This commit is contained in:
Dirk Mueller 2023-01-19 10:57:54 +01:00 committed by GitHub
commit 0e6102ce1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 4 deletions

View File

@ -10,6 +10,10 @@ on:
- 'README.md'
- 'doc/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rpmbuild:
name: 'rpmbuild test'

View File

@ -8,6 +8,10 @@ on:
schedule:
- cron: "13 12 * * 6"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze

View File

@ -7,6 +7,10 @@ on:
- '.github/**'
- '**.py'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
mypy:
runs-on: ubuntu-latest
@ -64,11 +68,28 @@ jobs:
repository: ${{ matrix.plugin_repository }}
path: plugin
- name: 'Run pylint with osc from master'
run: |
cd plugin
find . -type f -name "*.py" | sort | PYTHONPATH="../osc-master" xargs pylint --errors-only >> pylint-osc-master.log || :
echo
echo ">>>>> pylint-osc-master.log <<<<<"
cat pylint-osc-master.log
- name: 'Run pylint with osc from pull-request'
run: |
cd plugin
find . -type f -name "*.py" | sort | PYTHONPATH="../osc-pr" xargs pylint --errors-only >> pylint-osc-pr.log || :
echo
echo ">>>>> pylint-osc-pr.log <<<<<"
cat pylint-osc-pr.log
- name: 'Diff pylint runs'
run: |
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 || :
echo
echo ">>>>> diff <<<<<"
diff -u pylint-osc-master.log pylint-osc-pr.log

View File

@ -9,6 +9,10 @@ on:
- 'behave/**'
- 'tests/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
name: "unit"