Skip to content

Uyuni remove spacewalk utils extras #869

Uyuni remove spacewalk utils extras

Uyuni remove spacewalk utils extras #869

name: Python checkstyle
on:
push:
branches:
- master
paths:
- '**.py'
pull_request:
types:
- opened
- reopened
- synchronize
paths:
- '**.py'
jobs:
checkstyle:
runs-on: ubuntu-latest
container: registry.opensuse.org/systemsmanagement/uyuni/master/docker/containers_tw/uyuni-master-python:latest
steps:
- uses: actions/checkout@v4
- id: files
uses: Ana06/[email protected]
with:
filter: '*.py'
- id: filter-files
run: |
echo added_modified_renamed="$( echo '${{ steps.files.outputs.added_modified_renamed }}' | tr ' ' '\n' | grep -E '^(python|spacewalk|susemanager|containers)/' | tr '\n' ' ')" >> $GITHUB_ENV
- name: Run black on files
run: |
if [[ -z "$added_modified_renamed" ]]; then
echo "no files to check, OK"
else
black --check --diff -t py36 $added_modified_renamed
fi
- name: Run pylint on files
run: |
if [[ -z "$added_modified_renamed" ]]; then
echo "no files to check, OK"
else
pylint --rcfile=/root/.pylintrc $added_modified_renamed
fi