Skip to content

Commit

Permalink
ci: extend stylish workflow with flake8 check
Browse files Browse the repository at this point in the history
In addition to the format with black, check the sources also using
flake8. The job will install flake8 as available in the latest stable
Fedora version.

Use a marketplace action to annotate the files with the result of the
flake8 run.

Signed-off-by: Pino Toscano <ptoscano@redhat.com>
  • Loading branch information
ptoscano committed Mar 12, 2024
1 parent 33d9c24 commit e2034b7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/stylish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
stylish:
name: "black"
name: "black & flake8"
runs-on: ubuntu-latest
container:
image: fedora:latest
Expand All @@ -16,10 +16,18 @@ jobs:
run: |
dnf --setopt install_weak_deps=False install -y \
git-core \
python3-flake8 \
python3-pip
- uses: actions/checkout@v4

- uses: psf/black@stable
with:
version: "24.2.0"

- name: Setup flake8 annotations
uses: rbialon/flake8-annotations@v1

- name: Run flake8
run: |
flake8

0 comments on commit e2034b7

Please sign in to comment.