Skip to content

Commit 5411ae3

Browse files
authored
Merge pull request #14 from ahoppen/python-lint
Add a soundness check to lint Python files
2 parents be1b51b + 180fdb5 commit 5411ae3

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
@@ -59,6 +59,10 @@ on:
5959
type: boolean
6060
description: "Boolean to enable the YAML lint job. Defaults to true."
6161
default: true
62+
python_lint_check_enabled:
63+
type: boolean
64+
description: "Boolean to enable the Python lint check job. Defaults to true."
65+
default: true
6266

6367
## We are cancelling previously triggered workflow runs
6468
concurrency:
@@ -200,3 +204,18 @@ jobs:
200204
run: |
201205
curl -s https://raw.githubusercontent.com/swiftlang/github-workflows/refs/heads/main/.github/workflows/configs/yamllint.yml > /tmp/yamllint.yml
202206
yamllint --strict --config-file /tmp/yamllint.yml ${GITHUB_WORKSPACE}
207+
python-lint-check:
208+
name: Python lint check
209+
if: ${{ inputs.python_lint_check_enabled }}
210+
runs-on: ubuntu-latest
211+
timeout-minutes: 5
212+
steps:
213+
- name: Checkout repository
214+
uses: actions/checkout@v4
215+
with:
216+
persist-credentials: false
217+
- name: Run flake8
218+
run: |
219+
pip3 install flake8 flake8-import-order --break-system-packages
220+
cd ${GITHUB_WORKSPACE}
221+
flake8

0 commit comments

Comments
 (0)