Skip to content

Commit

Permalink
spec: Do not run Pylint as part of build
Browse files Browse the repository at this point in the history
Passing a linter check is not strictly necessary for a successful, and
since the result is ignored, it slows the build down unnecessarily.

+ Update workflow file.
  • Loading branch information
mgrabovsky committed May 4, 2023
1 parent 6e958b2 commit 5fd9b53
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run pylint
name: Run Pylint
on:
pull_request:
branches: [master]
Expand All @@ -10,25 +10,20 @@ jobs:
image: fedora:latest
runs-on: ubuntu-latest
steps:
- name: Install git
run: dnf --assumeyes install git

- name: Check out sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install build environment
run: dnf --assumeyes install dnf-plugins-core tito
run: dnf --assumeyes install dnf-plugins-core python3-pylint tito

- name: Install build dependencies
run: dnf builddep --assumeyes --spec gnome-abrt.spec
run: dnf --assumeyes builddep --spec gnome-abrt.spec

- name: Configure build
run: meson setup build

- name: Build and install packages
run: |
meson compile -C build rpm -v
dnf --assumeyes install ./build/rpm/**/*.rpm
run: ninja -v -C build

- name: Run pylint
- name: Run Pylint
run: meson test -C build --print-errorlogs lint
10 changes: 2 additions & 8 deletions gnome-abrt.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ BuildRequires: python3-libreport
BuildRequires: abrt-gui-devel > 2.14.0
BuildRequires: gtk3-devel
%if 0%{?fedora}
BuildRequires: python3-pylint
BuildRequires: python3-six
BuildRequires: python3-gobject
BuildRequires: python3-dbus
Expand All @@ -61,11 +60,7 @@ provides them with convenient way for managing these problems.


%build
%meson \
%if ! 0%{?fedora}
-Dlint=false \
%endif
%{nil}
%meson
%meson_build


Expand All @@ -75,8 +70,7 @@ provides them with convenient way for managing these problems.
%find_lang %{name}

%check
# do not fail on pylint warnings
%meson_test || :
%meson_test


%files -f %{name}.lang
Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
option('docs', type: 'boolean', value: true)
option('lint', type: 'boolean', value: true)
option('lint', type: 'boolean', value: false)

0 comments on commit 5fd9b53

Please sign in to comment.