Commit cc71280 1 parent 9be4795 commit cc71280 Copy full SHA for cc71280
File tree 2 files changed +27
-31
lines changed
2 files changed +27
-31
lines changed Original file line number Diff line number Diff line change 94
94
ports :
95
95
- 5432:5432
96
96
# Needed because the postgres container does not provide a healthcheck
97
- options :
98
- --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
97
+ options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
99
98
100
99
steps :
101
100
- uses : actions/checkout@v3
@@ -154,3 +153,29 @@ jobs:
154
153
- name : Run Bandit
155
154
run : |
156
155
bandit -r ./src/ -x tests,conf/utils.py -s B101
156
+
157
+ pre-commit :
158
+ name : Pre-commit hooks
159
+ runs-on : ubuntu-latest
160
+ steps :
161
+ - uses : actions/checkout@v4
162
+ with :
163
+ fetch-depth : 0
164
+
165
+ - name : Set up Python
166
+ uses : actions/setup-python@v5
167
+ with :
168
+ python-version : ' 3.x'
169
+
170
+ - name : Install pre-commit
171
+ run : pip install pre-commit
172
+
173
+ - name : Get changed files
174
+ id : changed-files
175
+ run : |
176
+ echo "files=$(git diff --name-only origin/main...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT
177
+
178
+ - name : Run pre-commit
179
+ continue-on-error : true
180
+ run : |
181
+ pre-commit run --files ${{ steps.changed-files.outputs.files }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments