File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 51
51
type : string
52
52
description : " Container image for the shell check job. Defaults to latest Swift Ubuntu image."
53
53
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"
54
62
55
63
# # We are cancelling previously triggered workflow runs
56
64
concurrency :
@@ -177,3 +185,21 @@ jobs:
177
185
run : |
178
186
apt-get -qq update && apt-get -qq -y install shellcheck
179
187
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
You can’t perform that action at this time.
0 commit comments