Skip to content

Commit ac9d4de

Browse files
committed
Add a soundness check to lint Python files
1 parent caf3350 commit ac9d4de

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/soundness.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ on:
5151
type: string
5252
description: "Container image for the shell check job. Defaults to latest Swift Ubuntu image."
5353
default: "swift:6.0-noble"
54+
python_lint_enabled:
55+
type: boolean
56+
description: "Boolean to enable the Python lint job. Defaults to true."
57+
default: true
5458

5559
## We are cancelling previously triggered workflow runs
5660
concurrency:
@@ -177,3 +181,18 @@ jobs:
177181
run: |
178182
apt-get -qq update && apt-get -qq -y install shellcheck
179183
git ls-files -z '*.sh' | xargs -0 shellcheck
184+
python-lint:
185+
name: Python lint
186+
if: ${{ inputs.python_lint_enabled }}
187+
runs-on: ubuntu-latest
188+
timeout-minutes: 5
189+
steps:
190+
- name: Checkout repository
191+
uses: actions/checkout@v4
192+
with:
193+
persist-credentials: false
194+
- name: Run flake8
195+
run: |
196+
pip3 install flake8 flake8-import-order --break-system-packages
197+
cd ${GITHUB_WORKSPACE}
198+
flake8

0 commit comments

Comments
 (0)