Skip to content

Commit c81e8dc

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

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/soundness.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ 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
58+
python_lint_container_image:
59+
type: string
60+
description: "Container image for the Python lint job. Defaults to latest Swift Ubuntu image."
61+
default: "swift:6.0-noble"
5462

5563
## We are cancelling previously triggered workflow runs
5664
concurrency:
@@ -177,3 +185,21 @@ jobs:
177185
run: |
178186
apt-get -qq update && apt-get -qq -y install shellcheck
179187
git ls-files -z '*.sh' | xargs -0 shellcheck
188+
python-lint:
189+
name: Python lint
190+
if: ${{ inputs.python_lint_enabled }}
191+
runs-on: ubuntu-latest
192+
container:
193+
image: ${{ inputs.python_lint_container_image }}
194+
timeout-minutes: 5
195+
steps:
196+
- name: Checkout repository
197+
uses: actions/checkout@v4
198+
with:
199+
persist-credentials: false
200+
- name: Run flake8
201+
run: |
202+
apt-get -qq update && apt-get -qq -y install python3 python3-pip python3-venv
203+
pip3 install flake8 flake8-import-order --break-system-packages
204+
cd ${GITHUB_WORKSPACE}
205+
flake8

0 commit comments

Comments
 (0)